Releases: elixir-cldr/cldr_numbers
Cldr Numbers version 2.18.4
Bug Fixes
- Allow
t:Cldr.Currency
as a:currency
option inCldr.Number.to_string/2
. Thanks to @jeroenvisser101 for the PR.
Cldr Numbers version 2.18.3
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 ofex_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
Bug Fixes
- Fix
Cldr.Number.Parser.scan/2
to correctly parse numbers like1kg
Cldr Numbers version 2.18.1
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 toCldr.Number.to_string/3
.
Cldr Numbers version 2.18.0
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 toCldr.Number.to_string/2
Cldr Numbers version 2.17.0
Enhancements
- Updated to require ex_cldr version 2.20.0 which includes CLDR 39 data.
Cldr Numbers version 2.17.0-rc.1
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 toCldr.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
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 forCldr.Number.to_string/2
Cldr Numbers version 2.16.1
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 toCldr.default_backend!/0
)
Cldr Numbers version 2.16.0
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)