Skip to content

Releases: elixir-cldr/cldr_numbers

Cldr Numbers version 2.33.1

22 Apr 21:33
Compare
Choose a tag to compare

Bug Fixes

  • Add config/prod.exs so MIX_ENV=prod compilation succeeds. Thanks to @camelpunch for the report. Closes #49.

Cldr Numbers version 2.33.0

20 Apr 22:06
Compare
Choose a tag to compare

Enhancements

  • Update to CLDR 45.0 data.

  • Support currency formatting when the given currency in a given locale uses a specific symbol that replaces the decimal separator. The only known example is the Cape Verde escudo. A formatted example formatting 20 CVE is 20$00.

Cldr Numbers version 2.32.4

17 Jan 23:19
Compare
Choose a tag to compare

Bug Fixes

  • Fix formatting a number when a currency is specified but the format has no currency symbol. Closes ex_money 162.

Cldr Numbers version 2.32.3

02 Nov 09:39
Compare
Choose a tag to compare

Bug Fixes

  • Fix compiler warnings on Elixir 1.16.

  • Fix return spec for Cldr.Number.to_string/2. Thanks to @Munksgaard for the PR. Closes #45.

Cldr Numbers version 2.32.2

11 Sep 21:35
Compare
Choose a tag to compare

Bug Fixes

  • Fixes RBNF rules for fractions. Previous the rule :spellout_cardinal was being used to format the fractional part of a number. However this rule is not defined for many locales. This is changed to :spellout_numbering which is available in all known locales.

Cldr Numbers version 2.32.1

09 Sep 05:58
Compare
Choose a tag to compare

Bug Fixes

  • Use currency default fractional digits for currency formats if no :fractional_digits option is provided. Thanks to @dhedlund for the report. This reverts that change made in 2.31.3 which was described as "Don't override currency fractional digits when formatting a number. The format should always define the fractional digits unless overriden by the :fractional_digits option." Fractional digits will also be set to the currency definition of digits unless overriden.

Cldr Numbers version 2.32.0

04 Sep 05:11
Compare
Choose a tag to compare

Bug Fixes

  • Fix formatting numbers with format :standard when the standard format is an RBNF rule.

  • Fix formatting numbers with an RBNF format that is defined on locale :und even when the formatting locale doesn't have an :rbnf_locale_name.

  • Improve several error messages around number systems and RBNF rules.

Deprecations

  • Cldr.Number.System.systems_with_digits/0 is deprecated in favour of Cldr.Number.System.numeric_systems/0.

Enhancements

  • Adds Cldr.Number.System.algorithmic_systems/0 which is the counterpoint to Cldr.Number.System.numeric_systems/0.

  • Functions in the Cldr.Number.Format module now default the backend argument to be Cldr.default_backend!/0.

Cldr Numbers version 2.31.3

24 Jul 05:06
Compare
Choose a tag to compare

Bug Fixes

  • Support format: :scientific which is documented but was not implemented as a valid option. Thanks to @petrus-jvrensburg for the report. Closes #38.

  • Don't override currency fractional digits when formatting a number. The format should always define the fractional digits unless overriden by the :fractional_digits option.

Cldr Numbers version 2.31.2

06 Jul 21:18
Compare
Choose a tag to compare

Bug Fixes

  • Fixes formatting of numbers in locales where the locale has no RBNF. Thanks to @petrus-jvrensburg for the report. Closes #37.

Cldr Numbers version 2.31.1

16 May 23:23
Compare
Choose a tag to compare

Bug Fixes

  • Ensure all RBNF rule names are valid function names. In at least one case ("2d_year") a rule name does not map to a valid Elixir function name. The rules are built with atom function names which is valid, but the string versions of that name do not parse. MyApp.Cldr.Rbnf.Spellout.2d_year/2 does not parse, evening though the function exists. This can cause interoperabiity issues with other libraries the introspect code, like inch_ex. From this release, rule names are forced to be valid, parseable function names by prepending an "r" to the rule name if the rule name starts with a digit. Thanks to @ggarciajr for the report.