tc39 / proposal-intl-duration-format

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

make separator numberingSystem dependent #133

Closed ryzokuken closed 1 year ago

ryzokuken commented 1 year ago

Change the separator from an independent, near-hardcoded value to one that's selected conditionally based on the numbering system.

Fixes: #108

MKhasib commented 1 year ago

Hey @ryzokuken @sffc Want to ask you whether Intl.Duration is going to be available soon? If not, do you think I can create a workaround to make a simple Intl.Duration for a simple project using Intl.NumberFormats,Intl.Locale or whatever using just javascript?

I would appreciate your thoughts on this, thank you!

sffc commented 1 year ago

@MKHasib There is no Intl.Duration, but Intl.DurationFormat is in the works. It can be partly polyfilled by combining Intl.NumberFormat with Intl.ListFormat. There is a polyfill in format.js, but it is not up to date with the current Stage 3 proposal. Here is an issue if you'd like to improve the format.js polyfill: https://github.com/formatjs/formatjs/issues/4000