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:
- Latest i18n data: This release includes an update to CLDR 48.2 and support for TZDB 2026a.
- New and improved
icu_calendar: This release contains new APIs inicu_calendar, as well as some behavior changes in icu_calendar; see the migration notes section.- Stable datetime arithmetic: It is now possible to to add and subtract dates via
date.try_add_with_options()anddate.try_until_with_options(). - 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. - Typed months: The new
Monthtype replaces month codes in a type safe way.Date::try_from_codes()has been replaced withDate::try_new()which uses these better types. Various calendar-specific constructors for lunisolar calendars have also been refreshed. - Experimental third-party crate integration: We now support converting from and formatting types from the
jiff,chrono, andtimecrates. Seeicu_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!
- Stable datetime arithmetic: It is now possible to to add and subtract dates via
- 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. - Experimental features:
- 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.
- Compact decimal formatter: Please share feedback in preparation for stabilization in a future release.
- ML segmentation: Initial code for RAdaBoost word segmenter for Chinese and CNN word segmenter for Thai.
- Unstable Cargo feature: Replaced the "experimental" Cargo feature with an "unstable" Cargo feature.
- Better hour cycles: Adds support for Clock12 and Clock24 in datetime formatting.
Migration Notes
-
The
JapaneseExtendedcalendar 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 customeast_asian_traditional::Rulesimplementation of the pre-Meiji lunisolar Japanese calendar. -
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 customhijri::Rulesimplementation using calendrical_calculations.