Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit spec: CLDR, UCOM, or something else? #10

Open
sffc opened this issue Nov 7, 2024 · 1 comment
Open

Unit spec: CLDR, UCOM, or something else? #10

sffc opened this issue Nov 7, 2024 · 1 comment

Comments

@sffc
Copy link

sffc commented Nov 7, 2024

Unicode CLDR gives a list of units: https://github.com/unicode-org/cldr/blob/main/common/supplemental/units.xml

There is also another list of units in a standard called The Unified Code for Units of Measure published by the Regenstrief Institute, which appears to be associated with Indiana University. https://ucum.org/ucum

Of course there is SI itself, published by the BIPM. https://www.bipm.org/en/

@zbraniecki has pointed to the Rust crate uom which implements the international system of measurements. It's not clear to me where exactly the crate gets its list. https://docs.rs/uom/0.36.0/uom/si/length/index.html

These different lists have different features and were made for different use cases. Unicode CLDR is primarily oriented toward units for human display; it is nominally what we use in ECMA-402 (although ECMA-402 contains only a small subset of it), and one key feature is its support for mixed units such as foot-and-inch. I am not as familiar with the other systems, so I can't speak as well to their advantages and disadvantages.

CC @zbraniecki @macchiati @roozbehp

@ben-allen
Copy link
Collaborator

ben-allen commented Nov 7, 2024

Upon looking through the UCUM list and the NIST's Guide to the SI, it seems like there's several units of more than historical interest that are not present in CLDR. The most immediately notable are the various units derived from the U.S. survey foot and possibly the apothecaries' weight units.

That said, I'd like to echo @sffc on the absolute necessity of support for mixed units, which is a clear advantage for CLDR.

Additionally, it appears that CLDR's support for the Scandinavian mile is an advantage for localization purposes. Cursory research indicates that it is in fact in general conversational usage in Sweden and would be important to support for localization purposes, though I'll have to defer to people with first-hand knowledge of customary units in Sweden on whether my cursory research is accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants