Releases: elixir-cldr/cldr_dates_times
Cldr Dates Times version 2.20.3
Cldr Dates Times version 2.20.2
Bug Fixes
- Return a better error when passing options that are not a keyword list to
Cldr.Date.to_string/2
,Cldr.Time.to_string/2
andCldr.DateTime.to_string/2
.
Cldr Dates Times version 2.20.0
Bug Fixes
- Fix
Cldr.Time.available_formats/3
when the locale parameter is a binary.
Enhancements
- Modify the
:prefer
option ofto_string/2
to take a list of preferences. Time formats may sometimes have a:unicode
or:ascii
preference. Date and datetime formats may have a:default
or:variant
preference. The:prefer
option can now be specified with one or both of these options.
Cldr Dates Times version 2.19.2
Bug Fixes
- Reinstate
Cldr.DateTime.Format.date_formats/3
which was incorrectly removed in version 2.19. Version 2.19 made efforts to improve the symmetry ofCldr.Date
,Cldr.Time
andCldr.DateTime
. Part of that work is to have each of those modules contain the functionsformats/3
andavailable_formats/3
. It was not intended at this time that the equivalent functions be removed fromCldr.DateTime.Format
. Thanks to @tjchambers for the report. Closes #51.
Cldr Dates Time version 2.19.1
Bug Fixes
- Include
:skeleton_tokenizer.xrl
to the hex package definition.
Cldr Dates Times version 2.19.0
Bug Fixes
-
Fix
Cldr.Date.to_string/2
with the optionera: :variant
to correctly render the variant "AD"/"CE"/"BC"/"BCE" text. -
Fix
Cldr.Date.to_string/2
with the optionperiod: :variant
to correctly render the variant "am"/"pm" text.
Enhancements
-
Adds support for partial dates in
Cldr.Date.to_string/2
. Partial dates are maps with one or more of the fields:year
,:month
,:day
and:calendar
. -
Adds support for partial time in
Cldr.Time.to_string/2
. Partial times are maps with one or more of the fields:hour
,:minute
, and:second
. -
Adds support for partial datetimes in
Cldr.DateTime.to_string/2
. Partial datetimes are maps with one or more of the fields:year
,:month
,:day
,:hour
,:minute
,:second
and:calendar
. -
Adds support for deriving the "best match" format for a date, time or datetime based upon the users requested format or deriving from the available date, time or datetime fields.
-
Adds support for formatting using format IDs (atoms that are keys to locale-independent formats) in
Cldr.Date.to_string/2
andCldr.Time.to_string/2
. They have been previously supported inCldr.DateTime.to_string/2
only. -
Add
MyApp.Cldr.DateTime.Format.common_date_time_format_names/0
. -
Improve the error message if
:hour
is outside the valid range.
Cldr Dates Times version 2.18.1
Cldr Dates Times version 2.18.0
Bug Fixes
-
Clarify format compiler documentation. Thanks to @tjchambers for the issue. Closes #46.
-
Fix typos. Thanks to @tjchambers for the PR. Closes #47.
v2.17.1
Cldr Dates Times version 2.17.0
Bug Fixes
-
Fix formatting with formats that have may have pluralization like the
:MMMMW
and:yw
formats. -
Fix
:underspecs
for dialyzer.
Enhancements
-
Update to CLDR 45.0 data.
-
Adds support for formats that have both unicode whitespace and ascii whitespace versions. The option
:prefer
is added toCldr.DateTime.to_string/3
. The default isprefer: :unicode
. The optionprefer: :ascii
is included for backwards compatibility of older applications. The formats that provide both:unicode
and:ascii
versions can be seen from the results ofCldr.DateTime.Format.date_time_available_formats/2
.