elixir-cldr / cldr_dates_times

Date & times formatting functions for the Common Locale Data Repository (CLDR) package https://github.com/elixir-cldr/cldr
Other
69 stars 13 forks source link

Time.Interval.to_string! not using the `greatest difference` between fields for formatting #21

Closed sfusato closed 3 years ago

sfusato commented 3 years ago

Example:

iex> Cldr.Time.Interval.to_string! ~T[20:00:00], ~T[22:00:00]
"8:00 – 10:00 PM"

iex> Cldr.Time.Interval.to_string! ~T[08:00:00], ~T[22:00:00]
"8:00 – 10:00 PM"

In the 2nd case, I would have expected "8:00 AM – 10:00 PM"

kipcole9 commented 3 years ago

Bug confirmed and location identified. Working on resolution. Thanks for the report, much appreciated.

kipcole9 commented 3 years ago

Fixed in this commit and published as ex_cldr_dates_times version 2.7.1. The changelog entry is:

Bug Fixes

Thanks very much for the collaboration and report.