You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, vue-i18n supports number formatting and datetime formatting with $n and $d. It would be great if it could also support Intl DurationFormat.
Suggested solution
I think a new function would be needed ($n for numbers, $d for datetime, maybe $u (dUration)) or $du ? This function could be just like number or datetime formats, with formats for each language, and a default that would be the one of Intl.
Alternative
For now, I'm using NumberFormat as it is the way duration works anyway, but that would be cool if it was supported in vuei18n.
Clear and concise description of the problem
Currently, vue-i18n supports number formatting and datetime formatting with $n and $d. It would be great if it could also support Intl DurationFormat.
Suggested solution
I think a new function would be needed ($n for numbers, $d for datetime, maybe $u (dUration)) or $du ? This function could be just like number or datetime formats, with formats for each language, and a default that would be the one of Intl.
Alternative
For now, I'm using NumberFormat as it is the way duration works anyway, but that would be cool if it was supported in vuei18n.
Additional context
https://moment.github.io/luxon/api-docs/index.html#durationtohuman (which uses NumberFormat), and about this new Intl object that is specialized in formatting durations. :sli
Validations
The text was updated successfully, but these errors were encountered: