← Back to release summary

Intl.DateTimeFormat.prototype.formatRange

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

Summary

Adds formatRange() and formatRangeToParts() methods to Intl.DateTimeFormat to format a range of times between two dates, such as 'Jan 10 – 20, 2007', or 'Jan 10 – Feb 20, 2007'.

Standards & signals

Docs: https://goo.gl/PGUQ1d

Samples: https://github.com/fabalbon/proposal-intl-DateTimeFormat-formatRange

View on chromestatus.com