JavaScript Intl Complete Reference
Intl in JavaScript is an object which is used for ECMAScript Internationalization API namespace.
Intl.function()
Example 1: Below examples illustrate the Intl.DateTimeFormat.prototype.resolvedOptions() method in JavaScript:
Javascript
<script> const geeks = new Intl.DateTimeFormat('zh-CN', { timeZone: 'UTC' }); const result = geeks.resolvedOptions(); console.log(result.locale); console.log(result.calendar); console.log(result.timeZone); const geeks1 = new Intl.DateTimeFormat('LT'); const result1 = geeks1.resolvedOptions(); console.log(result1.locale); console.log(result1.calendar);</script> |
Output:
zh-CN gregory UTC lt gregory
Methods: The complete list of JavaScript Intl methods are listed below.
JavaScript Intl Method | Description |
|---|---|
| JavaScript Intl.Collator.prototype.resolvedOptions() Method | This is used to return a new object with properties reflecting the locale and collation options computed during the initialization of this Collator object. |
| JavaScript Intl.Collator.supportedLocalesOf() Method | This is used to return an array containing those of the provided locales that are supported in collation without having to fall back to the runtime’s default locale. |
| JavaScript Intl.getCanonicalLocales() Method | In JavaScript is a Standard built-in object which returns an array containing the canonical locale names. |
| JavaScript Intl.ListFormat.prototype.format() Method | In JavaScript which returns a string with a language-specific representation of the list. |
| JavaScript Intl.ListFormat.prototype.resolvedOptions() Method | In JavaScript which returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current ListFormat object. |
| JavaScript Intl.ListFormat.prototype.formatToParts() Method | In JavaScript which returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. |
| JavaScript Intl.ListFormat.supportedLocalesOf() Method | In JavaScript, it returns an array containing those of the provided locales that are supported in date and time formatting. |
| JavaScript Intl.DateTimeFormat.supportedLocalesOf() Method | This method is an inbuilt method in JavaScript that returns an array containing those of the provided locales that are supported in date and time formatting. |
| JavaScript Intl.DateTimeFormat.prototype.resolvedOptions() Method | In JavaScript which returns a new object with properties reflecting the locale, date, and time formatting options computed during the initialization of this DateTimeFormat object. |
| JavaScript Intl.DateTimeFormat.prototype.formatRangeToParts() Method | In JavaScript which is used to allow locale-specific tokens representing each part of the formatted date range produced by DateTimeFormat formatters. |
| JavaScript Intl.DateTimeFormat.prototype.format() Method | In JavaScript which is used to format a date according to the locale and formatting options of this Intl.DateTimeFormat object. |
| JavaScript Intl.DateTimeFormat.prototype.formatRange() Method | In JavaScript which is used to format a date range in the most concise way based on the locale and options provided when instantiating Intl.DateTimeFormat object. |
| JavaScript Intl.DateTimeFormat.prototype.formatToParts() Method | In JavaScript which allows locale-aware formatting of strings produced by DateTimeFormat formatters. |






Please Login to comment...