Intl.RelativeTimeFormatBaseline · Widely available
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.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 16, 2020. Widely available since Mar 16, 2023.
Browser support
DesktopChrome
1–70Not supported
71+Supportedsince Dec 4, 2018
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–75Not supported
76+Supportedsince May 5, 2020
Current: 157Safari
1–13.1Not supported
14+Supportedsince Sep 16, 2020
Current: 27MobileChrome Android
18–70Not supported
71+Supportedsince Dec 4, 2018
Current: 155Firefox Android
4–68Not supported
79+Supportedsince Jul 28, 2020
Current: 157Safari iOS
1–13.4Not supported
14+Supportedsince Sep 16, 2020
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: RelativeTimeFormat.
Feature detection
JS · check before using
if ("RelativeTimeFormat" in Intl || ("prototype" in Intl && "RelativeTimeFormat" in Intl.prototype)) {
// Intl.RelativeTimeFormat is available
}Sub-features
Support for each part of the feature (10). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Intl.RelativeTimeFormat | 71 | 79 | 65 | 14 | 71 | 65 | 14 |
| Intl.RelativeTimeFormat.RelativeTimeFormat | 71 | 79 | 65 | 14 | 71 | 65 | 14 |
| Intl.RelativeTimeFormat.RelativeTimeFormat.locales_parameter | 71 | 79 | 65 | 14 | 71 | 65 | 14 |
| Intl.RelativeTimeFormat.RelativeTimeFormat.options_parameter.options_localeMatcher_parameter | 71 | 79 | 65 | 14 | 71 | 65 | 14 |
| Intl.RelativeTimeFormat.RelativeTimeFormat.options_parameter.options_numberingSystem_parameter | 71 | 79 | 76 | 14 | 71 | 79 | 14 |
| Intl.RelativeTimeFormat.RelativeTimeFormat.options_parameter.options_numeric_parameter | 71 | 79 | 65 | 14 | 71 | 65 | 14 |
| Intl.RelativeTimeFormat.format | 71 | 79 | 65 | 14 | 71 | 65 | 14 |
| Intl.RelativeTimeFormat.formatToParts | 71 | 79 | 70 | 14 | 71 | 79 | 14 |
| Intl.RelativeTimeFormat.resolvedOptions | 71 | 79 | 65 | 14 | 71 | 65 | 14 |
| Intl.RelativeTimeFormat.supportedLocalesOf | 71 | 79 | 65 | 14 | 71 | 65 | 14 |