Skip to content

Cldr Units version 3.16.0

Compare
Choose a tag to compare
@kipcole9 kipcole9 released this 28 Apr 01:13

Bug Fixes

  • Support Decimal version 2.1 and later which raise a different exception that older releases when calling Decimal.to_integer/1 when the value isn't convertible.

Enhancements

  • Updates to CLDR 43 data. The unit :beaufort is introduced but only in some locales.

  • Remove the dependency on ratio. All unit values are now decimals.

  • Support string-formatted decimals in Cldr.Unit.new/3. This allows the creation of units like Cldr.Unit.new(:foot, "3.39") which will also be produced now by the Inspect protocol. Apart from the inherent consistency this also improves accuracy will all tests for conversion and preference from CLDR test data now passing.

  • Add a Cldr.Unit.Range type to allow creating, enumerating and formatting unit ranges. Thanks to @ribanez7 for the collaboration. Closes #33.

  • Add support for multiplication and division of arbitrary units. Thanks to @maennchen for the report (and patience). Closes #32.

  • Adjust the inspect protocol implementation to emit executable code strings.