You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Localize.Date.parse/2, Localize.Time.parse/2 and Localize.DateTime.parse/2 parse a localized date, time or datetime string back to a value. They delegate to calendrical, which the application must add as a dependency.
Localize.DependencyRequiredError is returned when an operation needs a companion package the application does not depend on, naming the :package and the :operation. It is what the new parse/2 functions return when calendrical is absent.
Changed
Breaking.Localize.validate_territory/1 returns the canonical territory code, so validate_territory("AN") is now {:ok, :CW} where it was {:ok, :AN} — likewise SU to :RU, DD to :DE, and CS and YU both to :RS. This matches validate_locale/1, which already resolved them.
Fixed
Localize.Utils.Math.mod/2 and amod/2 carry overloaded contracts, so integer arguments type as integer results under dialyzer. Downstream calendar arithmetic no longer types as float-possible when it flows through these functions.
Localize.validate_territory/1 accepts territory codes that CLDR replaces rather than lists: "UK", and the alpha-3 and numeric forms "GBR" and "826", were all rejected and now resolve to :GB. This matters for anything mapping a ccTLD to a territory, since .uk is the domain while GB is the code.
Localize.Interval.to_string/3 and to_parts/3 no longer raise FunctionClauseError for en-CA with fields: :month_and_day, format: :short. CLDR publishes an alt="variant" interval pattern for en-CA, and it is now resolved as a single date's pattern is, honouring :prefer.
en-CA skeleton formats such as :yMd and :MEd render the locale's standard pattern, 2026-05-03, rather than the day-first variant 3/5/2026 they returned whatever :prefer asked for. prefer: :variant still selects the variant.