ecma402 icon indicating copy to clipboard operation
ecma402 copied to clipboard

Add frequency units

Open tremby opened this issue 2 years ago • 1 comments

I was surprised to find I couldn't use a Hertz unit in a number formatter. I wondered if I could specify it as "per-second" or "-per-second", but both raise errors.

By extension, kHz, MHz, GHz, THz, etc.

I can also see a use for per minute, such as revolutions per minute (engineering, automotive, etc), beats per minute (music), and possibly per hour or per day (statistics?)

The only mention I can find of frequency in this issue tracker is in #32, where it was proposed but seemingly then never discussed again, and I didn't find mention of hertz at all.

tremby avatar May 31 '23 01:05 tremby

Triaged this in the list of requests for new units: https://github.com/tc39/ecma402/labels/new%20unit

I'd love to add all 200+ CLDR units, but unfortunately that would increase the download size of browsers, so long as browsers include all locale data in their initial download. I hope implementations can eventually agree on solutions to that problem so that we can add more features without negatively impacting data size.

sffc avatar May 31 '23 01:05 sffc