ecma402 icon indicating copy to clipboard operation
ecma402 copied to clipboard

Add Units mass-metric-ton, volume-cubic-*

Open enqueue opened this issue 4 years ago • 1 comments

We applaud the advances in Localization that are now available via the standard API, but the lack of the support for some units our users rely on forces us to seek other solutions for presenting amounts and units. It is not a big challenge per se: We can use a library or even process CLDR data ourselves for our applications, but now that the API offers support for formatting units, it is a pity that we cannot use it because some (in our perspective) customary units are not "sanctioned". Having read the comments on #449 , #470 and tc39/proposal-unified-intl-numberformat#39 I reckon that there is a difficult trade-off between extensive support for many different units and browser artifact size. Sorry, I don't know how to come up with the best ordered list of the most popular units world-wide either. But I would like to make a case for mass-metric-ton and the volume-cubic-<lengthunit> units.

Here are some important applications of the metric-ton unit:

  • Measuring greenhouse gas emissions, e.g. OECD data, EPA Greenhouse Gas Inventory Data Explorer
  • Transport statistics, e.g. tonne-kilometers Eurostat Ramon Nomenclature
  • Ocean shipping: Many™ people use kilogram on their freight documents, but it when presented with a summary readers would expect values to be shown in metric tons.
  • Road infrastructure, e.g. the default unit for modeling weight-related road access restrictions used on OpenStreetMap is the metric ton, see maxweight.

These applications rely on volume-cubic units:

  • Transport: For most transports it is necessary to know the volume of the cargo you want to ship. For general cargo this is not measured in liters, but in cubic meters (or cubic foot in regions where metric system is not so popular). Even in the courier, parcel, express industry the volume is relevant.
  • Aerosol concentrations (droplets per cubic meter)

I know that these examples are very subjective and biased. It must be hard to select the right units given the pressure for small implementation size. But at least I wanted to let you know which units we are missing. Perhaps you can consider them as candidates for your next iteration. Thank you!

enqueue avatar Aug 28 '21 11:08 enqueue

Related: https://github.com/tc39/ecma402/issues/503, https://github.com/tc39/ecma402/issues/470

Thank you for the request. I anticipate that there will be a future iteration to add more measurement units, and every signal for which units are important for web developers helps inform what will make the cut.

For some context, the methodology for the list of units in the first cut is explained in https://github.com/tc39/proposal-unified-intl-numberformat/issues/39

sffc avatar Aug 28 '21 20:08 sffc