Skip to content

Cldr Dates Times version 2.25.0

Choose a tag to compare

@kipcole9 kipcole9 released this 05 Nov 17:48
· 20 commits to main since this release

Breaking Changes

  • Changes in the implemementation of time zone formatting may result in different (but semantically the same) strings for formats that include time zone information. See Bug Fixes below.

Bug Fixes

  • Fixes the generation of time zone formats to be in accordance with CLDR Time Zone Names. This is particularly true of the following time zone formats:

    • Generic non-location format (eg "Pacific Time", "PT")
    • Generic partial location format (eg "Pacific Time (Canada)")
    • Generic location format (eg "France Time", "Adelaide Time")
    • Specific non-location format (eg "Pacific Standard Time", "PST")
    • Localized GMT format (eg "GMT+03:30", "Гринуич+03:30", "GMT+?")
  • Fixes Cldr.DateTime.Relative.to_string/3 when the relative value is an integer of 2 or -2 and the locale provides a specific word for that value. For example, in English there are words for 1 day in advance or behind ("today" and "yesterday"). When specifing 2 days ago, English has no specific word so the result is "2 days ago". In German the result is "vorgestern". Similary for the English "in 2 days", the German result will be "übermorgen".

Enhancements

  • Updates to CLDR 48 data.

  • Adds Cldr.DateTime.Format.gmt_unknown_format/1 to return a string representing an unknown GMT offset.

  • Adds style: :at to Cldr.DateTime.Relative.to_string/2. This allows formatting of string like "tomorrow at 3:30 PM". The default is style: :standard.

  • Significant improvement in support of date time skeletons. Skeletons are a flexible way to express desired formatting in a locale-indepdendent way.

  • Support is added for the "j", "J" and "C" input skeleton symbols which will be substituted with the locales preferred hour formats. These changes also improve implicit format generation derived from whatever date and time data is passed to the Cldr.Date.to_string/3, Cldr.Time.to_string/3, Cldr.DateTime.to_string/3 functions.