tc39 / proposal-intl-duration-format

https://tc39.es/proposal-intl-duration-format
MIT License
171 stars 18 forks source link

Question about specific localization example #211

Open ljharb opened 1 month ago

ljharb commented 1 month ago

@sffc gave a talk this evening with an example using this proposal, of 2.5 hours, in Spanish - as “2 horas y 30 minutos”.

This isn’t wrong, but i feel it’d be much more common to say “2 horas y media” (in English, “2 and a half hours”, not “2 hours and 30 minutes”) Is that type of idiom a conscious choice to omit? Is there an option that prefers it?

sffc commented 1 month ago

Sounds like a good addition for Intl.DurationFormat v2. It is similar to the numeric option in Intl.RelativeTimeFormat, which toggles between "1 day ago" and "yesterday".

I do not believe that this data exists in CLDR, though.