Cldr Dates Times version 2.25.0
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/3when the relative value is an integer of2or-2and 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/1to return a string representing an unknown GMT offset. -
Adds
style: :attoCldr.DateTime.Relative.to_string/2. This allows formatting of string like "tomorrow at 3:30 PM". The default isstyle: :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/3functions.