Ex_Cldr_Numbers v2.13.0-rc.0 Release Notes

Release Date: 2020-05-02 // over 1 year ago
  • 💥 Breaking change

    • 🚀 In previous releases, requesting a currency format in Number.to_string/3 without specifying an option :currency would return an error. In this release, a currency is derived from the locale (either the :locale parameter or from backend.get_locale()). The affected currency formats are :currency, :accounting, :currency_long and :currency_short

    ✨ Enhancements

    Cldr.Number.to_string/2 now detects the number system from any supplied locale. If provided, the option :number_system takes precedence over the number system derived from a locale.

    Add :round_nearest formatting option for Cldr.Number.to_string/3. If provided, this option overrides the value defined by the :format option.

    Refines number system detection. The order of precedence is:

    The :number_system option if provided

    The :number_system from the locale if provided

    The :number_system from the current locale for the supplied backend. This locale is retrieved with backend.get_locale()