Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for Intl.DateTimeFormat.prototype.formatRange().
Developer library 6
Firefox 91 release notes for developers
1715984](https://bugzil.la/1715984)). The property has not been usable by web developers since Firefox 88, this completes the removal. ### JavaScript - Intl.DateTimeFormat.prototype.formatRange() and Intl.DateTimeFormat.prototype.formatRangeToParts() are now supported in release builds. The `formatRange()` method returns a localized and formatted string for the range between two Date objects (e.g., "1/05/21 – 1/10
Intl.DateTimeFormat
The **`Intl.DateTimeFormat`** object enables language-sensitive date and time formatting. taller ```js interactive-example const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738)); // Results below assume UTC timezone - your results may vary // Specify default date formatting for language (locale) console.log(new Intl.DateTimeFormat("en-US").format(date)); // Expected output: "12/20/2020" // Specify default
Intl.DateTimeFormat.prototype.formatRange()
The **`formatRange()`** method of Intl.DateTimeFormat instances formats a date range in the most concise way based on the locales and options provided when instantiating this `Intl.DateTimeFormat` object. taller ```js interactive-example const options1 = { weekday: "long", year: "numeric", month: "long", day: "numeric", }; const options2 = { year: "2-digit", month: "numeric", day: "numeric" }; const startD
Intl.DateTimeFormat.prototype.formatRangeToParts()
The **`formatRangeToParts()`** method of Intl.DateTimeFormat instances returns an array of objects representing each part of the formatted string that would be returned by formatRange(). It is useful for building custom strings from the locale-specific tokens. taller ```js interactive-example const startDate = new Date(Date.UTC(2007, 0, 10, 10, 0, 0)); // > 'Wed, 10 Jan 2007 10:00:00 GMT' const endDate = new Date(D
Intl.DateTimeFormat() constructor
The **`Intl.DateTimeFormat()`** constructor creates Intl.DateTimeFormat objects. taller ```js interactive-example const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738)); // Results below assume UTC timezone - your results may vary // Specify default date formatting for language (locale) console.log(new Intl.DateTimeFormat("en-US").format(date)); // Expected output: "12/20/2020" // Specify default date form
Internationalization
the following functionalities: - [Getting information about a locale](#locale_information) using Intl.Locale. - [Formatting data](#formatting_data) using Intl.DateTimeFormat, Intl.DurationFormat, Intl.ListFormat, Intl.NumberFormat, and Intl.RelativeTimeFormat. - [Collation](#collation) (i.e., comparing strings for sorting or searching) using Intl.Collator. - [Selecting plural forms](#plural_rules) using Intl.PluralR