Intl.DurationFormatBaseline · Newly available
The Intl.DurationFormat API creates a locale-aware formatter that turns an object representing a duration (such as days, hours, and minutes) into a string.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Mar 4, 2025.
Browser support
DesktopChrome
1–128Not supported
129+Supportedsince Sep 17, 2024
Current: 155Edge
12–128Not supported
129+Supportedsince Sep 19, 2024
Current: 154Firefox
1–135Not supported
136+Supportedsince Mar 4, 2025
Current: 157Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27MobileChrome Android
18–128Not supported
129+Supportedsince Sep 17, 2024
Current: 155Firefox Android
4–135Not supported
136+Supportedsince Mar 4, 2025
Current: 157Safari iOS
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27How to use
Every current browser supports this, but it only became Baseline on Mar 4, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: DurationFormat.
Feature detection
JS · check before using
if ("DurationFormat" in Intl || ("prototype" in Intl && "DurationFormat" in Intl.prototype)) {
// Intl.DurationFormat is available
}Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Intl.DurationFormat | 129 | 129 | 136 | 16.4 | 129 | 136 | 16.4 |
| Intl.DurationFormat.DurationFormat | 129 | 129 | 136 | 16.4 | 129 | 136 | 16.4 |
| Intl.DurationFormat.format | 129 | 129 | 136 | 16.4 | 129 | 136 | 16.4 |
| Intl.DurationFormat.formatToParts | 129 | 129 | 136 | 16.4 | 129 | 136 | 16.4 |
| Intl.DurationFormat.resolvedOptions | 129 | 129 | 136 | 16.4 | 129 | 136 | 16.4 |
| Intl.DurationFormat.supportedLocalesOf | 129 | 129 | 136 | 16.4 | 129 | 136 | 16.4 |