← Back to release summary

Intl.RelativeTimeFormat

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 71)
Intent stage
None

Summary

Intl.RelativeTimeFormat helps libraries and frameworks format relative time in a localized fashion by providing internationalized messages for date and time fields, using a customary local word or phrase when available. For example, calling its format() method with -5 and 'day' would return the string '5 days ago'. Intl.RelativeTimeFormat is available behind a flag in Firefox 58.

Standards & signals

Docs: https://developers.google.com/web/updates/2018/10/intl-relativetimeformat

View on chromestatus.com