Skip to content

Releases: elixir-cldr/cldr_dates_times

Cldr Dates Times version 2.16.0

02 Nov 09:49
Compare
Choose a tag to compare

Bug Fixes

  • Fix formatting time intervals when the to time is not greater than the from time. This allows time intervals that cross midnight to be formatted correctly. Thanks to @larshei for the report. Closes #42.

  • Fix compiler warnings on Elixir 1.16.

Enhancements

  • Adds options :date_format and :time_format to Cldr.DateTime.Interval.to_string/2 and Cldr.DateTime.to_string/2. These options allow separate formatting of the date and time parts of a datetime, including those that are part of an interval. Thanks to @jmoldrich for the report (and patience). Closes #33.

Cldr Dates Times version 2.15.0

16 Oct 19:57
Compare
Choose a tag to compare

Deprecations

  • The support of :style as a synonym for :format with the functions Cldr.Time.to_string/2, Cldr.Date.to_string/2 and Cldr.DateTime.to_string/2 is now removed. The :style option is now used to influence the use of "at" formats in Cldr.DateTime.to_string/2. :style also remains a valid option for interval formatting.

Enhancements

  • Add support for "at" style formatting for DateTime structs. This style is documented in TR35 and was introduced in CLDR 43. Thanks to @jueberschlag for the report and motivation to get this done.

Cldr Dates Times version 2.14.3

09 Oct 18:33
Compare
Choose a tag to compare

Bug Fixes

  • Fix formatting date intervals with :month_and_day style when the last date is in a different year to the first. Thanks to @matt-glover for the report. Closes #40.

Cldr Dates Times version 2.14.2

24 Sep 09:37
Compare
Choose a tag to compare

Bug Fixes

  • Fix additional typespecs for various functions that allow a string-based locale identifier. Thanks to @jarrodmoldrich for the report.

Cldr Dates Times version 2.14.1

23 Sep 14:56
Compare
Choose a tag to compare

Bug Fixes

  • Fix typespecs for various functions that allow a string-based locale identifier. Thanks to @jarrodmoldrich for the report. Closes #39.

Cldr Dates Times version 2.14.0

16 Aug 23:31
Compare
Choose a tag to compare

Enhancements

  • Updates to ex_cldr version 2.37.0 which includes data from CLDR release 43

  • Adds an option :wrapper to Cldr.DateTime.to_string/2, Cldr.Date.to_string/2 and Cldr.Time.to_string/2. The argument is a 2-arity function that receives the parameters string and tag where tag is an atom denoting the time unit being formatted (for example, :minute or :year or :literal). The function must return either iodata or a "safe string" such as that returned by Phoenix.HTML.Tag.content_tag/3. The function can be used to wrap format elements in HTML or other tags.

Cldr Dates Times version 2.13.3

12 Mar 22:40
Compare
Choose a tag to compare

This release requires (and configures) ex_cldr version 2.36.0 or later. That version fixes the interval format data so that formats required by locales that use 24-hour times are not overwritten by data for 12-hour formats. As a result, formatting intervals using a format key directly (ie one of the keys in the map returned by MyApp.Cldr.DateTime.Format.date_time_interval_formats/1) may find the key has changed.

Bug Fixes

  • Fixes localised time interval formatting to respect the locale's preference for 12-hour or 24-hour times. Thanks to @Gladear for the report and collaboration. Closes #35.

Cldr Dates Times version 2.13.2

12 Mar 11:41
Compare
Choose a tag to compare

Bug Fixes

  • Fixed interval formats when the format provided is a string (rather than the normal atom-based predefined formats)

  • Fixed setting the number system from options (typographical error)

  • Removed spurious IO.inspect/2 output when the format is a string.

Cldr Dates Times version 2.13.1

12 Nov 21:31
Compare
Choose a tag to compare

Bug Fixes

  • Fixes doc generation errors (no functional changes to executing code). Closes #34. Thanks to @sax for the report and the PR.

Cldr Dates Times version 2.13.0

24 Oct 05:59
Compare
Choose a tag to compare

Enhancements

  • Updates to CLDR 42. The data time formats for several locales have changed from " at " to ", ". This is a new category of formats that retain the at formats but these are not yet exposed in ex_cldr_dates_times.

Updated data from CLDR

  • Several locales, including en , have changed the standard date/time formats replacing <date> at <time> with <date>, <time>. There is a new format type (the at type) available in the underlying data however these formats are not yet exposed in ex_cldr_dates_times. An update will be published before year end 2022 to apply this functionality.
  • The Yukon metazone has been un-deprecated
  • Day-periods are added for hi_Latn, and adjusted for mr to only have evening1
  • Support time zone data 2022e. For 2022e: After 2022-10-27, “Asia/Amman” and “Asia/Damascus” removed from metazone “Europe_Eastern” with no replacement metazone.