Skip to content

Releases: elixir-cldr/cldr_numbers

Cldr Numbers version 2.23.0-rc.4

26 Oct 13:13
Compare
Choose a tag to compare
Pre-release

Bug Fixes

  • Arbitrary RBNF rule lookup falls back to the root locale (called "und") when checking if a rule is available. Thanks to @maennchen for the report. Closes #22.

Cldr Numbers version 2.23.0-rc.3

25 Oct 10:54
Compare
Choose a tag to compare
Pre-release

Deprecations

  • Don't call deprecated Cldr.Config.known_locale_names/1, call Cldr.Locale.Loader.known_locale_names/1 instead.

Cldr Numbers version 2.23.0-rc.2

24 Oct 05:15
Compare
Choose a tag to compare
Pre-release

Bug Fixes

  • Don't call deprecated Cldr.Config.get_locale/2, use Cldr.Locale.Loader.get_locale/2 instead.

Cldr Numbers version 2.23.0-rc.0

03 Oct 14:25
Compare
Choose a tag to compare
Pre-release

Enhancements

  • Updates to CLDR release 40

Cldr Numbers version 2.22.1

12 Sep 21:55
Compare
Choose a tag to compare

Bug Fixes

  • Return the remainder strings with casing preserved when resolving currencies and pers in Cldr.Numbers.Parser.

Cldr Numbers version 2.22.0

22 Aug 00:39
Compare
Choose a tag to compare

Enhancements

  • Cldr.Number.Parser.resolve_currencies/2 and Cldr.Number.Parser.resolve_per/2 only perform replacements if the the found string is not adjacent to an alphabetic character.

  • Cldr.Number.Parser.resolve/2 and Cldr.Number.Parser.find_and_replace/2 are made public functions.

  • Add resolve_pers/2 and resolve_per/2 to the MyApp.Number module.

Cldr Numbers version 2.21.0

19 Aug 09:22
Compare
Choose a tag to compare

Enhancements

  • Add Cldr.Number.Parser.resolve_pers/2 which will tokenize percent and permille symbols into :percent and :permille. This is similar to the Cldr.Number.Parser.resolve_currencies/2 function but for percent and permille symbols. An example is:
iex> Cldr.Number.Parser.scan("100%")
...> |> Cldr.Number.Parser.resolve_pers()
[100, :percent]

Cldr Numbers version 2.20.0

18 Aug 09:08
Compare
Choose a tag to compare

Bug Fixes

  • Improve number parsing with Cldr.Number.Parser.scan/2 when the string has lists of numbers separated by commas. Thanks to @DaTrader for the report. Closes #19.

Enhancements

  • Add support for custom currency symbols. This extends the use of the :currency_symbol option. In previousl releases this option was required to be :standard or :iso. Now the value can also be :narrow, :symbol or a string which will be used as the currency symbol. From the documentation for Cldr.Number.to_string/3:

    • currency_symbol: Allows overriding a currency symbol. The alternatives
      are:
      • :iso the ISO currency code will be used instead of the default
        currency symbol.
      • :narrow uses the narrow symbol defined for the locale. The same
        narrow symbol can be defined for more than one currency and therefore this
        should be used with care. If no narrow symbol is defined, the standard
        symbol is used.
      • :symbol uses the standard symbol defined in CLDR. A symbol is unique
        for each currency and can be safely used.
      • "string" uses string as the currency symbol
      • :standard (the default and recommended) uses the CLDR-defined symbol
        based upon the currency format for the locale.

Cldr Numbers version 2.19.0

01 Jul 12:44
Compare
Choose a tag to compare

Enhancements

  • Updated to ex_cldr version 2.23.0 which changes the names of some of the field in the "-u-" extension to match the CLDR canonical name. In particular the field name number_system changes to numbers.

Cldr Numbers version 2.18.4

17 Jun 05:52
Compare
Choose a tag to compare

Bug Fixes

  • Allow t:Cldr.Currency as a :currency option in Cldr.Number.to_string/2. Thanks to @jeroenvisser101 for the PR.