Web platform features explorer

Intl.RelativeTimeFormat

Widely available since 2023-03-16
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.

Browser support

  • Chrome 71 Released on 2018-12-04
  • Chrome Android 71 Released on 2018-12-04
  • Edge 79 Released on 2020-01-15
  • Firefox 76 Released on 2020-05-05
  • Firefox for Android 79 Released on 2020-07-28
  • Safari 14 Released on 2020-09-16
  • Safari on iOS 14 Released on 2020-09-16