Cldr Units version 3.16.0
Bug Fixes
- Support Decimal version 2.1 and later which raise a different exception that older releases when calling
Decimal.to_integer/1when the value isn't convertible.
Enhancements
-
Updates to CLDR 43 data. The unit
:beaufortis 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 likeCldr.Unit.new(:foot, "3.39")which will also be produced now by theInspectprotocol. 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.Rangetype 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.