ecma402
ecma402 copied to clipboard
Sequence unit formatting
Sequence units are things like "feet and inches", "hours and minutes", etc.
I have a CLDR proposal to extend unit identifier syntax to support sequence units with the + separator:
foot+inchmeter+centimeterhour+minute+second
If we adopted this extension into ECMA-402, then this is how we could format sequence units:
const fmt = new Intl.NumberFormat("de-CH", {
style: "unit",
unit: "meter+centimeter"
});
console.log(fmt.format(125));
// "1 m 25 cm"
@younies @littledan @zbraniecki @longlho