Addition of power / energy units to Intl.NumberFormat

Hi all,

The Intl.NumberFormat object been fantastic to use so far, but while writing something for electric vehicles I was wondering whether the addition of units for power / energy has been considered and/or what obstacles there might have been in, as they are not part of the subset (yet)?

The TC39 document links to the "Common Locale Data Repository release 38 unit validity data" which fortunately does seem to list e.g:

  • power-watt (milli, kilo, mega, giga)
  • energy-kilowatt-hour
  • electric-volt
  • electric-ohm

Thank you for your time!

2 Likes

Yes! Also see Add `kilowatt-hour` unit to Intl.NumberFormat ยท Issue #739 ยท tc39/ecma402 ยท GitHub with some interest at the moment, and with an added draft proposal here: GitHub - johanrd/proposal-intl-energy-units: Draft proposal for adding Intl.NumberFormat energy units like `kilowatt`, `watt, `kilowatt-hour` and `watt-hour`.

As I understand it we would need to attract a TC39 champion for this. Anyone in mind?