All Versions
38
Latest Version
Avg Release Cycle
25 days
Latest Release
349 days ago

Changelog History
Page 2

  • v2.13.1 Changes

    May 13, 2020

    ๐Ÿš€ This is the changelog for Cldr v2.13.1 released on May 14th, 2020. For older changelogs please consult the release tag on GitHub

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix regression and allow :fractional_digits to be 0. Thanks to @coladarci. Fixes #12.
  • v2.13 Changes

    This is the changelog for Cldr v2.13.0 released on _____, 2020. For older changelogs please consult the release tag on GitHub

    โœจ 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 Cldr.Number.System.number_system_from_locale/2 to extract the number system from a locale.

  • v2.13.0-rc.0 Changes

    May 02, 2020

    ๐Ÿ’ฅ 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()

  • v2.12.1 Changes

    March 02, 2020

    ๐Ÿš€ This is the changelog for Cldr v2.12.1 released on March 2nd, 2020. For older changelogs please consult the release tag on GitHub

    ๐Ÿ› Bug Fixes

    • Use the RBNF format spellout_numbering instead of spellout_cardinal for the Cldr.Number.to_string/3 option format: :spellout since spellout_numbering has a larger locale coverage of RBNF formats.
  • v2.12.0 Changes

    January 21, 2020

    ๐Ÿš€ This is the changelog for Cldr v2.12.0 released on January 21st, 2020. For older changelogs please consult the release tag on GitHub

    โœจ Enhancements

    • โšก๏ธ Updates version requirement for cldr_utils in order to support versions of decimal from 1.6 up to 2.0.

    ๐Ÿ› Bug fixes

    • Fixes an incorrect typespec on Cldr.Number.Format.format_from_locale_or_options/1 that was causing a dialyzer warning
  • v2.11.0 Changes

    January 18, 2020

    ๐Ÿš€ This is the changelog for Cldr v2.11.0 released on January 19th, 2020. For older changelogs please consult the release tag on GitHub

    โœจ Enhancements

    • ๐Ÿ‘‰ Uses the number system defined by the locale if it is specified. The number system is defined as part of the U extension. The order of precedence is:

      • :default if no option is provided to MyApp.Cldr.Number.to_string/2 and no number system is defined in the locale
      • The option :number_system if it is provided to MyApp.Cldr.Number.to_string/2
      • The locale's number_system if it is defined and the option :number_system to MyApp.Cldr.Number.to_string/2 is not provided

    Examples:

     # Locale defines a number system and no option :number_system is provided
     iex> TestBackend.Cldr.Number.to_string(1234, locale: "th-u-nu-thai")
     {:ok, "เน‘,เน’เน“เน”"}
    
     # Locale defines a number system but an option :number_system is also provded which
     # take precedence
     iex> MyApp.Cldr.Number.to_string 1234, locale: "th-u-nu-latn", number_system: :thai
     {:ok, "เน‘,เน’เน“เน”"}
    
     # A number system is defined in the locale but it is not supported by the
     # locale
     iex> MyApp.Cldr.Number.to_string 1234, locale: "en-AU-u-nu-thai"
     {:error,
      {Cldr.UnknownNumberSystemError,
       "The number system :thai is unknown for the locale named \"en\". Valid number systems are %{default: :latn, native: :latn}"}}
    
    • ๐Ÿ‘‰ Uses the currency code defined by the locale if it is specified and the number format requested is :currency. The currency code is defined as part of the U extension. The order of precedence is:

      • The option :currency if it is provided to MyApp.Cldr.Number.to_string/2
      • The locale's currency code if it is defined and the option :currency to MyApp.Cldr.Number.to_string/2 is not provided

    Examples:

     # Use the currency code :AUD specified in the locale
     iex> MyApp.Cldr.Number.to_string 1234, locale: "en-AU-u-cu-aud", format: :currency
     {:ok, "A$1,234.00"}
    
     # Use the currency code :USD provided as an option in precedence over the currency code
     # defined by the locale
     iex> MyApp.Cldr.Number.to_string 1234, locale: "en-AU-u-cu-aud", format: :currency, currency: :USD
     {:ok, "$1,234.00"}
    
    • ๐Ÿ‘‰ Uses the currency format defined by the locale if it is specified and the number format requested is :currency or :accounting. The currency format is defined as part of the U extension. The order of precedence is:

      • The locale's currency format if it is defined and the option :format to MyApp.Cldr.Number.to_string/2 is either :currency or :accounting. Therefore the locales currency format takes precendence over the :format argument but only if :format is a currency format.
      • The option :format in every other case

    Examples:

     # Using in the locale currency format - just happens to be the same as the format option
     iex> MyApp.Cldr.Number.to_string -1234, locale: "en-AU-u-cu-aud-cf-standard", format: :currency
     {:ok, "A$-1,234.00"}
    
     # The locale format takes precedence over the format option
     iex> MyApp.Cldr.Number.to_string -1234, locale: "en-AU-u-cu-aud-cf-standard", format: :accounting
     {:ok, "A$-1,234.00"}
    
     iex> MyApp.Cldr.Number.to_string -1234, locale: "en-AU-u-cu-aud-cf-account", format: :accounting
     {:ok, "(A$1,234.00)"}
    
     iex> MyApp.Cldr.Number.to_string -1234, locale: "en-AU-u-cu-aud-cf-account", format: :currency
     {:ok, "(A$1,234.00)"}
    
  • v2.10.0 Changes

    January 14, 2020

    ๐Ÿš€ This is the changelog for Cldr v2.10.0 released on January 15th, 2020. For older changelogs please consult the release tag on GitHub

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fixes formatting of negative percentages. Actually fixes an issue where the default negative format would be incorrect in many cases. Thanks to @maennchen. Closes #11.

    โœจ Enhancements

    • โš  Optionally logs a warning if compiling a number format at runtime. The warning is emitted only once for each format to reduce log clutter. The log warning is emitted if the backend configuration key :supress_warnings is set to false (this is the default value). The warn_once mechanism depends on the availability of the :persistent_term module which is only available from OTP 21.2 onwards. On earlier releases of OTP no warning will be emitted.
  • v2.9.0 Changes

    October 20, 2019

    ๐Ÿš€ This is the changelog for Cldr v2.9.0 released on October 20th, 2019. For older changelogs please consult the release tag on GitHub

    โœจ Enhancements

    • Adds option :currency_symbol to Cldr.Number.to_string/2. This option, when set to :iso changes a currency format to force using the ISO currency code instead of the native currency symbol.
  • v2.8.0 Changes

    October 09, 2019

    ๐Ÿš€ This is the changelog for Cldr v2.8.0 released on October 10th, 2019. For older changelogs please consult the release tag on GitHub

    โœจ Enhancements

    • โšก๏ธ Update ex_cldr to version 2.11.0 which encapsulates CLDR version 36.0.0 data.
  • v2.7.2 Changes

    September 06, 2019

    ๐Ÿš€ This is the changelog for Cldr v2.7.2 released on September 7th, 2019. For older changelogs please consult the release tag on GitHub

    ๐Ÿ› Bug Fixes

    • 0๏ธโƒฃ Call Keyword.get_lazy/3 when accessing Cldr.default_locale/0 to avoid exceptions when no default backend is configured but an optional :backend has been passed.