vue-i18n icon indicating copy to clipboard operation
vue-i18n copied to clipboard

Support to Intl.RelativeTimeFormat

Open Roriz opened this issue 2 years ago • 1 comments
trafficstars

Clear and concise description of the problem

I would like to request the addition of support for Intl.RelativeTimeFormat to the vue-i18n library. This feature would allow for the display of relative time (e.g. "5 minutes ago") in a localized format, making it more user-friendly for international audiences.

Suggested solution

Something inside of datetime implementation? https://github.com/intlify/vue-i18n-next/blob/250446b9918906f4acaa4fb1f53e143ef48f25ab/packages/core-base/src/datetime.ts

Alternative

Workaround for that is use native function: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat

Additional context

No response

Validations

Roriz avatar Jan 21 '23 08:01 Roriz