Web features explorer

Intl.RelativeTimeFormat

Widely available
Tags: javascript Groups: JavaScript > Internationalization

The Intl.RelativeTimeFormat API creates a locale-aware formatter that turns an object representing a relative time (such as '1 day ago') into a localized string. To learn more, see Intl.RelativeTimeFormat at MDN.

Compatibility