Skip to content

Releases: elixir-cldr/cldr_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.

Cldr Numbers version 2.18.3

12 Jun 08:03
Compare
Choose a tag to compare

Breaking Change

  • There is a minor breaking change in the error return from Cldr.Number.Parser.parse/2. Previously the error return was {:error, string}. It is now more consistent with the rest of ex_cldr and returns {:error, {exception, message}}

Bug Fixes

  • Fix Cldr.Number.Parser.parse/2 for numbers that are in non-latin scripts (like Thai, Arabic, ...). There are 66 known number systems that have decimal digits as of CLDR39.

Cldr Numbers version 2.18.2

10 Jun 21:51
Compare
Choose a tag to compare

Bug Fixes

  • Fix Cldr.Number.Parser.scan/2 to correctly parse numbers like 1kg

Cldr Numbers version 2.18.1

08 Jun 05:30
Compare
Choose a tag to compare

Bug Fixes

Thanks to @alaadahmed for the collaboration to fix two bugs in rules based number formatting.

  • Fixes RBNF formatting options setting for :spellout_ordinal

  • Allows any defined RNBF rule for a locale to be invoked as the :format option to Cldr.Number.to_string/3.

Cldr Numbers version 2.18.0

17 May 03:19
Compare
Choose a tag to compare

Bug Fixes

  • Fixes short and long number formatting.

  • Fixes formatting whent the format string consists only of digits. Previously this would erroneously set both the maximum and minimum integer digits. Now it only sets the minimum integer digits.

Enhancements

  • Add option :maximum_integer_digits as an option to Cldr.Number.to_string/2

Cldr Numbers version 2.17.0

07 Apr 23:29
Compare
Choose a tag to compare

Enhancements

Cldr Numbers version 2.17.0-rc.1

22 Mar 23:50
Compare
Choose a tag to compare
Pre-release

Bug Fixes

  • Complies with updated TR35 that makes clear that if a currency is being formatted (detected by the presence of a valid :currency option to Cldr.Number.to_string/2 but the format does not have a currency placeholder then the decimal separator is replaced with the currency symbol. For example:
# Decimal format, no currency specified
iex> Cldr.Number.to_string 1234.456, format: "###.########"
{:ok, "1234.456"}

# Decimal format, currency specified
iex> Cldr.Number.to_string 1234.456, format: "###.########", currency: :AUD
{:ok, "1234A$46"}

# Decimal format, currency specified with narrow symbol
iex> Cldr.Number.to_string 1234.456, format: "###.########", currency: :AUD, currency_symbol: :narrow
{:ok, "1234$46"}

# Decimal format, currency specified with ISO symbol
iex> Cldr.Number.to_string 1234.456, format: "###.########", currency: :AUD, currency_symbol: :iso
{:ok, "1234AUD46"}

Cldr Numbers version 2.17.0-rc.0

19 Mar 02:09
Compare
Choose a tag to compare
Pre-release

Bug Fixes

  • Fix to ensure that Cldr.Number.to_string/2 with the format :spellout_ordinal_verbose uses the correct RBNF rules. It was previously incorrectly using :spellout_ordinal.

Enhancements

  • Updated to require ex_cldr version 2.20 which includes CLDR 39 data.

  • Add :spellout_cardinal_verbose as a format for Cldr.Number.to_string/2

Cldr Numbers version 2.16.1

08 Nov 12:36
Compare
Choose a tag to compare

Bug Fixes

  • Fix bug in Cldr.Number.System.number_system_from/1 to correctly allow a binary language tag without a backend parameter (which will then default to Cldr.default_backend!/0)

Cldr Numbers version 2.16.0

01 Nov 00:21
Compare
Choose a tag to compare

Enhancements

  • Support CLDR 38

  • Add Cldr.Number.Formatter.Short.short_format_exponent/2 to support compact number pluralization that is added to CLDR 38 (for the "fr" locale only in this release)