Releases: elixir-cldr/cldr_dates_times
Cldr Dates Times version 2.16.0
Bug Fixes
-
Fix formatting time intervals when the
to
time is not greater than thefrom
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
toCldr.DateTime.Interval.to_string/2
andCldr.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
Deprecations
- The support of
:style
as a synonym for:format
with the functionsCldr.Time.to_string/2
,Cldr.Date.to_string/2
andCldr.DateTime.to_string/2
is now removed. The:style
option is now used to influence the use of "at" formats inCldr.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
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
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
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
Enhancements
-
Updates to ex_cldr version 2.37.0 which includes data from CLDR release 43
-
Adds an option
:wrapper
toCldr.DateTime.to_string/2
,Cldr.Date.to_string/2
andCldr.Time.to_string/2
. The argument is a 2-arity function that receives the parametersstring
andtag
wheretag
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 byPhoenix.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
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
Cldr Dates Times version 2.13.2
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
Cldr Dates Times version 2.13.0
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 inex_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 (theat
type) available in the underlying data however these formats are not yet exposed inex_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 haveevening1
- 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.