Localize version 0.27.0
[0.27.0] — May 8th, 2026
Bug Fixes
-
Fix
Localize.Interval.to_string/3:shorttime-interval format using the wrong hour cycle on 24-hour locales.:shortnow picks:hmor:Hmper the locale's preferred hour cycle (honouring any-u-hc-Unicode-extension override), matching the cycle used byLocalize.Time.to_string/2:short. Thanks to @woylie for the follow-up report. Fixes #22. -
Fix
Localize.Time.to_string/2silently ignoring the-u-hc-Unicode-extension override on the locale. The override now applies to both standard formats (:short/:medium/:long/:full) — remapped to the locale's cycle-appropriate:hm/:hms/:hmsv(12-hour, with the locale's AM/PM marker) or:Hm/:Hms/:Hmsv(24-hour) skeleton — and to user-supplied skeleton atoms like:Hms, where the hour symbols are substituted. -
Fix zone-field artefacts on
%Time{}standard formats. ATimecarries no zone information, soLocalize.Time.to_string/2now strips zone characters (z,Z,O,v,V,x,X) from the resolved skeleton ID before formatting.Localize.Time.to_string!(~T[21:00:00], format: :long, locale: :ja)returns"21:00:00"(was"21:00:00 "— trailing space), and:es:fullreturns"21:00:00"instead of"21:00:00 ()"(parens around the empty zone field). -
Adds support for
Decimalversion 3.0 to address a CVE. Thanks to @mitchellhenke for the PR.
Enhancements
- Add
Localize.Time.hour_format_from_locale/1(and!/1) returning the locale's preferred hour cycle (:h11/:h12/:h23/:h24), honouring any-u-hc-Unicode-extension override.