Skip to content

Cldr Calendars version 1.25.0

Choose a tag to compare

@kipcole9 kipcole9 released this 06 Jul 22:51
· 92 commits to main since this release

Bug Fixes

  • Fix Cldr.Calendar.Preference.calendar_from_locale/1 when -u-ca-<calendar> is specified as part of the locale.

Enhancements

  • This release provides initial support for partial dates. Partial dates are those that do not have all of the fields :year, :month, :day and :calendar. Not all functions require all parts of a date. And in some cases, like formatting just the year and the month, it shouldn't be necessary to provide data that has no use. Of course many functions do require all fields be present - like adding a number of days to a date. In these cases, missing fields will cause an error to be returned. ex_cldr_dates_times version 2.19.0 and later take advantage of partial dates when formatting.

  • Support Cldr.Calendar.localize/3 option era: :variant to return an alternative localization. For instance, in the :en locale, this will return CE and BCE rather than the default AD and BC.

  • Add MyApp.Cldr.Calendar.localize/3 that delegates to Cldr.Calendar.localize/3.