Localize version 0..28.0
[0.28.0] — May 9th, 2026
Behaviour Change
-
Localize.Interval.to_string/3Date intervals (style:date, the default) now resolve their skeleton per-locale instead of using a hard-coded locale-independent mapping. The interval looks upLocalize.DateTime.Format.date_formats(locale_id)[format]— the same mappingLocalize.Date.to_string/2uses — so date intervals follow the same conventions as single dates for the same:format. Visible effect on locales whose single-Date skeletons differ from the previous Interval table — most notably:- ja
:mediumis now numeric ("2012/01/05~2012/01/06"), aligning with single Date:medium("2012/01/05"); was previously the abbreviated month form"2012年1月5日~6日". The richer Japanese-character form is now:long(matching single Date:long). - de
:mediumis now numeric ("15.01.2022 – 20.03.2022"); was previously the abbreviated month form. To get"15. Jan. – 20. März 2022"request the:yMMMdskeleton explicitly. - en
:longuses full month name with no weekday ("January 5, 2012 – January 6, 2012"); was previously the:yMMMEdform"Thu, Jan 5 – Fri, Jan 6, 2012". The weekday now appears at:full. Per-locale skeletons that aren't shipped in CLDR'sinterval_formatsdata fall back to formatting each endpoint withLocalize.Date.to_string/2and joining via the locale'sinterval_format_fallbacktemplate. Non-:datestyles (:month,:month_and_day,:year_and_month) remain locale-independent — they describe a deliberate field selection unrelated to standard date styles. The staticLocalize.Interval.date_styles/0no longer includes a:dateentry.
- ja
Bug Fixes
-
Strip zone token for NaiveDateTime too in
Localize.Time.to_string/2since they also do not have a time zone field. Relates to #22. -
Fix
Localize.Interval.to_string/3silently ignoring the:date_formatoption on Date-only intervals. The option now overrides:formaton the date axis, mirroring the precedence used for:time_formaton time intervals. Relates to #22. -
Fix
Localize.Interval.to_string/3raisingLocalize.DateTimeIntervalFormatErrorwhen called withformat: :fullon a Date interval. Relates to #22. -
Localize.Utils.Math.sqrt/2now respects the currentDecimal.Context.get/0precision when called with aDecimal— the result is rounded to the configured precision and Newton's-method convergence scales accordingly. -
Added the test suite for
Localize.Utilsthat are derived from theCldr.Utilequivalents.