Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
3 results across 6 corpora for Intl.ListFormat.prototype.resolvedOptions().
Developer library 3
Intl.ListFormat
ns an array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. - Intl.ListFormat.prototype.resolvedOptions() - : Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current `Intl.ListFormat` object. ## Examples ### Using format The following example shows how to create
Intl.ListFormat.prototype.resolvedOptions()
The **`resolvedOptions()`** method of Intl.ListFormat instances returns a new object with properties reflecting the options computed during initialization of this `ListFormat` object. JavaScript Demo: Intl.ListFormat.prototype.resolvedOptions() ```js interactive-example const deListFormatter = new Intl.ListFormat("de-DE", { type: "disjunction" }); const options = deListFormatter.resolvedOptions(); console.log(opti
Internationalization
heoretically dependent on what API you are using the calendar with, so to get the default calendar of `en-US` as used by `Intl.DateTimeFormat`, you can use its resolvedOptions() method. The same goes for other properties. ```js const locale = new Intl.Locale("en-US"); console.log(locale.calendar); // undefined; it's not provided console.log(new Intl.DateTimeFormat(locale).resolvedOptions().calendar); // "gregory" ``