Releases: elixir-cldr/cldr_numbers
Releases · elixir-cldr/cldr_numbers
Cldr Numbers version 2.23.0-rc.4
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
Deprecations
- Don't call deprecated
Cldr.Config.known_locale_names/1
, callCldr.Locale.Loader.known_locale_names/1
instead.
Cldr Numbers version 2.23.0-rc.2
Bug Fixes
- Don't call deprecated
Cldr.Config.get_locale/2
, useCldr.Locale.Loader.get_locale/2
instead.
Cldr Numbers version 2.23.0-rc.0
Enhancements
- Updates to CLDR release 40
Cldr Numbers version 2.22.1
Bug Fixes
- Return the remainder strings with casing preserved when resolving currencies and pers in
Cldr.Numbers.Parser
.
Cldr Numbers version 2.22.0
Enhancements
-
Cldr.Number.Parser.resolve_currencies/2
andCldr.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
andCldr.Number.Parser.find_and_replace/2
are made public functions. -
Add
resolve_pers/2
andresolve_per/2
to theMyApp.Number
module.
Cldr Numbers version 2.21.0
Enhancements
- Add
Cldr.Number.Parser.resolve_pers/2
which will tokenize percent and permille symbols into:percent
and:permille
. This is similar to theCldr.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
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 forCldr.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
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 tonumbers
.
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.