Skip to content

Releases: elixir-cldr/cldr_numbers

Cldr Numbers version 2.6.1

03 Jun 11:47
Compare
Choose a tag to compare

Bug Fixes

  • Ensure Cldr.Number.to_string/3 doesn't transliterate is the number systems are compatible for a given locale. Basically, if the local and number system don't require transliteration from 0..9 to another script (like indian, arabic, ...) then we don't do it. This improves performance by about 10% for this common case.

Cldr Numbers version 2.6.0

28 Mar 11:06
Compare
Choose a tag to compare

Enhancements

Cldr Numbers version 2.5.0

23 Mar 05:48
Compare
Choose a tag to compare

Enhancements

  • Supports Cldr.default_backend() as a default for a backend on functions in Cldr.Number

Cldr Numbers version 2.4.4

21 Mar 14:36
Compare
Choose a tag to compare

Bug Fixes

  • Rbnf.Ordinal and Rbnf.Spellout now respect the optional generation of @moduledocs in a backend

Cldr Numbers version 2.4.3

20 Mar 02:44
Compare
Choose a tag to compare

Bug Fixes

  • Fix dialyzer warnings

Cldr Numbers version 2.4.2

15 Mar 15:47
Compare
Choose a tag to compare

Enhancements

  • Makes generation of documentation for backend modules optional. This is implemented by the :generate_docs option to the backend configuration. The default is true. For example:
defmodule MyApp.Cldr do
  use Cldr,
    default_locale: "en-001",
    locales: ["en", "ja"],
    gettext: MyApp.Gettext,
    generate_docs: false
end

Cldr Numbers version 2.4.1

07 Mar 15:17
Compare
Choose a tag to compare

Bug Fixes

  • Fix fractional grouping. Previsouly when there was no grouping, the group size was being set to the number of fractional digits.

  • Fix scientific precision. Previously the mantissa was not being rounded because the prioritisation of significant digits over exponent digits was not being correctly reconciled.

  • Fix formatting precision of an exponent. A format of 0E00 will now format the exponent with two digits.

  • Fix or silence dialyzer warnings

Cldr Numbers version 2.4.0

04 Mar 03:54
Compare
Choose a tag to compare

Enhancements

  • Adds Cldr.Number.Format.default_grouping_for/2 to return the default grouping of digits for a locale. This is useful for external number formats like ex_cldr_print.

Cldr Numbers version 2.3.0

01 Mar 15:57
Compare
Choose a tag to compare

Enhancements

  • Opens up the formatting pipeline for use by other formatting systems like printf. This is implemented by the introduction of Cldr.Number.Format.Meta to create the abstract metadata struct. This struct is used for Cldr.Number.to_string/3 and is now available for use by other libraries. The function Cldr.Number.Formatter.Decimal.to_string/3 is the primary function that should be used by other libraries.

Cldr Numbers version 2.2.0

24 Feb 14:24
Compare
Choose a tag to compare

Bug Fixes

  • Fix generating an error tuple when the number system is a binary

  • Fix @doc errors

Enhancements

  • Adds Cldr.Number.Symbol.all_decimal_symbols/1 and Cldr.Number.Symbol.all_grouping_symbols/1 that support parsing of numbers. The symbols are returned as a list.

  • Adds Cldr.Number.Symbol.all_decimal_symbols_class/1 and Cldr.Number.Symbol.all_grouping_symbols_class/1. The symbols are returned as a String.t which can then be used to define a character class when building a regex.