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

Add frequency units #784

Open
tremby opened this issue May 31, 2023 · 1 comment
Open

Add frequency units #784

tremby opened this issue May 31, 2023 · 1 comment
Labels
c: numbers Component: numbers, currency, units new unit Request for a new unit in Intl.NumberFormat s: comment Status: more info is needed to move forward

Comments

@tremby
Copy link

tremby commented May 31, 2023

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.

@sffc sffc added c: numbers Component: numbers, currency, units s: comment Status: more info is needed to move forward new unit Request for a new unit in Intl.NumberFormat labels May 31, 2023
@sffc
Copy link
Contributor

sffc commented May 31, 2023

Triaged this in the list of requests for new units: new unit Request for a new unit in Intl.NumberFormat

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: numbers Component: numbers, currency, units new unit Request for a new unit in Intl.NumberFormat s: comment Status: more info is needed to move forward
Projects
None yet
Development

No branches or pull requests

2 participants