ecma402
ecma402 copied to clipboard
RelativeTimeFormat should support compound units
We got the following feature request from a Google Search client:
I'm working on a feature … that answers [what time will it be in X minutes/hours].
The UI spec calls for adding a phrase such as "one hour 20 minutes ago" or "in 45 minutes" to the template. In my use case I will have a timestamp for the "current time" … and the number of minutes relative to that that time.
What's the best way to format a relative timespan, such as "one hour 20 minutes ago" … ?
Backlink: https://yaqs.corp.google.com/eng/q/6499139655958528
Upstream: CLDR-14144
Also see: https://github.com/tc39/proposal-intl-duration-format/issues/29
CC @younies