Skip to content

ICU4X 2.2.0

Latest

Choose a tag to compare

@Manishearth Manishearth released this 01 Apr 20:37
· 48 commits to main since this release
ed9cb2a

The ICU4X Technical Committee is happy to announce ICU4X 2.2, an update to our modular, portable, and secure i18n library.

Important changes in ICU4X 2.2 include:

  1. Latest i18n data: This release includes an update to CLDR 48.2 and support for TZDB 2026a.
  2. New and improved icu_calendar: This release contains new APIs in icu_calendar, as well as some behavior changes in icu_calendar; see the migration notes section.
    1. Stable datetime arithmetic: It is now possible to to add and subtract dates via date.try_add_with_options() and date.try_until_with_options().
    2. More flexible date construction: The new Date::try_from_fields() API allows constructing dates from all kinds of constituent data: extended years, era years, ordinal months, month codes, etc., and supports different kinds of overflow handling.
    3. Typed months: The new Month type replaces month codes in a type safe way. Date::try_from_codes() has been replaced with Date::try_new() which uses these better types. Various calendar-specific constructors for lunisolar calendars have also been refreshed.
    4. Experimental third-party crate integration: We now support converting from and formatting types from the jiff, chrono, and time crates. See icu_datetime::input::third_party. We’re not yet sure if these integrations should live in ICU4X, in the third party crates, or some adapter crate, and are open to feedback!
  3. Experimental Kotlin Bindings: We now have Kotlin bindings for ICU4X (found under ffi/mvn), with the same set of supported APIs as our other cross-language bindings.
  4. Experimental features:
    1. Display names: Adds new internal data layout exposed via RegionDisplayName and ScriptDisplayName APIs. The old data layout, optimized for loading multiple names at once, is moved into the multi module. Please share feedback on our tracking issue.
    2. Compact decimal formatter: Please share feedback in preparation for stabilization in a future release.
    3. ML segmentation: Initial code for RAdaBoost word segmenter for Chinese and CNN word segmenter for Thai.
  5. Unstable Cargo feature: Replaced the "experimental" Cargo feature with an "unstable" Cargo feature.
  6. Better hour cycles: Adds support for Clock12 and Clock24 in datetime formatting.

Migration Notes

  1. The JapaneseExtended calendar has been deprecated. CLDR removed the pre-Meiji eras because no implementation correctly implemented them. Clients of pre-Meiji eras are encouraged to comment on CLDR-11400 and potentially write a custom east_asian_traditional::Rules implementation of the pre-Meiji lunisolar Japanese calendar.

  2. Hijri<AstronomicalSimulation> has also been deprecated. It previously returned estimates of the Hijri calendar based on simulations published by Reingold et al. To restore this behavior, write a custom hijri::Rules implementation using calendrical_calculations.

See the full changelog for more information