Changelog History
Page 1
-
v3.9.1 Changes
๐ This is the changelog for Cldr_units v3.9.1 released on November 15th, 2021. For older changelogs please consult the release tag on GitHub
๐ Bug Fixes
๐ Support parsing units with multiple "per" clauses like "gallon per feet per second".
๐ Fix canonical unit name for currency units. This also fixes unit math with currency units.
โ Add
display_name/2
to backend modules.
-
v3.9.0 Changes
๐ This is the changelog for Cldr_units v3.9.0 released on November 14th, 2021. For older changelogs please consult the release tag on GitHub
๐ Bug Fixes
Use
import Config
not deprecateduse Mix.Config
in config files. Only significant for developers ofex_cldr_units
.๐ Make
decimal
a required dependency, not optional, since various pattern matches expect its presence.
โจ Enhancements
- โ Add support for currency-based units. This allows for calculations and formatting of units such as "$2 per gallon". For this example, the unit would be created with
Cldr.Unit.new(2, "curr-usd-per-gallon")
. The inverse is also possible, for example:
iex> MyApp.Cldr.Unit.to_string(Cldr.Unit.new!(2, "curr-usd-per-gallon")) {:ok, "$2.00 per gallon"} iex> MyApp.Cldr.Unit.to_string(Cldr.Unit.new!(2, "gallon-per-curr-usd")) {:ok, "2 gallons per US dollar"}
- โ Add support for binary factor prefixed units. These units are factors of 1024 and include "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi" and "yobi". For example:
iex> MyApp.Cldr.Unit.to_string Cldr.Unit.new!(3, :gibibyte) {:ok, "3 gibibytes"}
- โ Add support for integer prefixes for units. This is useful for units like "liters per 100 kilometers" or "25 calories per 100 grams". For example:
iex> MyApp.Cldr.Unit.to_string Cldr.Unit.new!(25, "calorie_per_100-gram") {:ok, "25 calories per 100 grams"}
-
v3.8.0 Changes
๐ This is the changelog for Cldr_units v3.8.0 released on October 27th, 2021. For older changelogs please consult the release tag on GitHub
โจ Enhancements
- ๐ Updates to use CLDR 40 data. The release notes say:
In CLDR v40, the focus is on Grammatical features (gender and case) for units of measurement in additional locales. In many languages, forming grammatical phrases requires dealing with grammatical gender and case. Without that, it can sound as bad as "on top of 3 hours" instead of "in 3 hours":
Phase 1 (CLDR v39) of grammatical features included just 12 locales (da, de, es, fr, hi, it, nl, no, pl, pt, ru, sv).
Phase 2 (CLDR v40, this release) has expanded the number of locales by 29 (am, ar, bn, ca, cs, el, fi, gu, he, hr, hu, hy, is, kn, lt, lv, ml, mr, nb, pa, ro, si, sk, sl, sr, ta, te, uk, ur), but for a more restricted number of units.
๐ Deprecations
Don't call deprecated
Cldr.Config.get_locale/2
, useCldr.Locale.Loader.get_config/2
instead.Don't call deprecated
Cldr.Config.known_locale_names/1
, callCldr.Locale.Loader.known_locale_names/1
instead.
-
v3.8.0-rc.2 Changes
๐ This is the changelog for Cldr_units v3.8.0-rc.2 released on October 25th, 2021. For older changelogs please consult the release tag on GitHub
๐ Deprecations
- Don't call deprecated
Cldr.Config.known_locale_names/1
, callCldr.Locale.Loader.known_locale_names/1
instead.
- Don't call deprecated
-
v3.8.0-rc.1 Changes
๐ This is the changelog for Cldr_units v3.8.0-rc.1 released on October 24th, 2021. For older changelogs please consult the release tag on GitHub
๐ Deprecations
- Don't call deprecated
Cldr.Config.get_locale/2
, useCldr.Locale.Loader.get_config/2
instead.
- Don't call deprecated
-
v3.8.0-rc.0 Changes
๐ This is the changelog for Cldr_units v3.8.0-rc.0 released on October 3rd, 2021. For older changelogs please consult the release tag on GitHub
โจ Enhancements
- ๐ Updates to use CLDR 40 data. The release notes say:
In CLDR v40, the focus is on Grammatical features (gender and case) for units of measurement in additional locales. In many languages, forming grammatical phrases requires dealing with grammatical gender and case. Without that, it can sound as bad as "on top of 3 hours" instead of "in 3 hours":
- Phase 1 (CLDR v39) of grammatical features included just 12 locales (da, de, es, fr, hi, it, nl, no, pl, pt, ru, sv).
- ๐ Phase 2 (CLDR v40, this release) has expanded the number of locales by 29 (am, ar, bn, ca, cs, el, fi, gu, he, hr, hu, hy, is, kn, lt, lv, ml, mr, nb, pa, ro, si, sk, sl, sr, ta, te, uk, ur), but for a more restricted number of units.
-
v3.7.1 Changes
๐ This is the changelog for Cldr_units v3.7.1 released on August 20th, 2021. For older changelogs please consult the release tag on GitHub
๐ Bug Fixes
- ๐ Fix doc errors. Thanks to @maennchen for the report. Doc errors in other
ex_cldr
packages are also updated.
- ๐ Fix doc errors. Thanks to @maennchen for the report. Doc errors in other
-
v3.7.0 Changes
๐ This is the changelog for Cldr_units v3.7.0 released on July 1st, 2021. For older changelogs please consult the release tag on GitHub
โจ Enhancements
โ Add support for the
Cldr.DisplayName
protocol fort:Cldr.Unit
structs.๐ฆ Updated to ex_cldr version 2.23.0 which changes the names of some of the fields in the "-u-" extension to match the CLDR canonical name. In particular the field name
measurement_system
changes toms
. Also the value ofms
for the UK System will be:imperial
not:uksystem
.
-
v3.6.0 Changes
๐ This is the changelog for Cldr_units v3.6.0 released on June 12th, 2021. For older changelogs please consult the release tag on GitHub
โจ Enhancements
- โ Add
Cldr.Unit.parse/2
to parse unit strings of the form1kg
into at:Cldr.Unit
struct.
- โ Add
-
v3.5.3 Changes
๐ This is the changelog for Cldr_units v3.5.3 released on May 20th, 2021. For older changelogs please consult the release tag on GitHub
๐ Bug Fixes
- ๐ง Fixes formatting units when invoking
MyApp.Cldr.Unit.to_string/2
(ie on the backend module) and no default backend is configured. Thanks again to @maennchen. Closes #22. Require at least ex_cldr version 2.22.1
- ๐ง Fixes formatting units when invoking