?u/p1-9This specification is developed on GitHub with the help of the ECMAScript community. There are a number of ways to contribute to the development of this specification:
Refer to the
This specification's source can be found at https://github.com/tc39/ecma402.
The ECMAScript 2026 Internationalization API Specification (ECMA-402 13th Edition), provides key language sensitive functionality as a complement to This Standard defines the application programming interface for ECMAScript objects that support programs that need to adapt to the linguistic and cultural conventions used by different human languages and countries. A conforming implementation of this specification must conform to A conforming implementation is permitted to provide additional objects, properties, and functions beyond those described in this specification. In particular, a conforming implementation is permitted to provide properties not described in this specification, and values for those properties, for objects that are described herein. A conforming implementation is not permitted to add optional arguments to the functions defined in this specification. A conforming implementation is permitted to accept additional values, and then have The following referenced documents are required for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.
ECMAScript 2026 Language Specification (ECMA-262 17th Edition, or successor). This section is non-normative. Internationalization of software means designing it such that it supports or can be easily adapted to support the needs of users speaking different languages and having different cultural expectations, and enables worldwide communication between them. Localization then is the actual adaptation to a specific language and culture. Globalization of software is commonly understood to be the combination of internationalization and localization. Globalization starts at the lowest level by using a text representation that supports all languages in the world, and using standard identifiers to identify languages, countries, time zones, and other relevant parameters. It continues with using a user interface language and data presentation that the user understands, and finally often requires product-specific adaptations to the user's language, culture, and environment. This specification is designed to complement This specification provides several key pieces of language-sensitive functionality that are required in most applications: locale selection and inspection, string comparison (collation) and case conversion, pluralization rules, text segmentation, and formatting of numbers, absolute and relative dates and times, durations, and lists. While Applications can use the API in two ways: The Every Due to the nature of internationalization, this specification has to leave several details implementation dependent:
In browser implementations the initial set of locales, currencies, calendars, numbering systems, and other enumerable items visible to a particular origin must be the same for all users sharing the same user Throughout this specification, implementation- and locale-dependent behaviour is referred to as ILD, and implementation-, locale-, and numbering system-dependent behaviour is referred to as ILND.
ECMA 402 describes the schema of the data used by its functions. The
data contained inside is implementation-dependent, and expected to
change over time and vary between implementations. The variation is
visible by programmers, and it is possible to construct programs which
will depend on a particular output. However, this specification
attempts to describe reasonable constraints which will allow
well-written programs to function across implementations.
Implementations are encouraged to continue their efforts to harmonize
linguistic data.
This standard uses a subset of the notational conventions of As an extension to the This specification uses blocks demarcated as The following table extends the Well-Known Intrinsic Objects table defined in This clause describes the String values used in this specification to identify locales, currencies, time zones, measurement units, numbering systems, collations, calendars, and pattern strings. The String values used to identify locales, currencies, scripts, and time zones are interpreted in an ASCII-case-insensitive manner, treating the code units 0x0041 through 0x005A (corresponding to Unicode characters LATIN CAPITAL LETTER A through LATIN CAPITAL LETTER Z) as equivalent to the corresponding code units 0x0061 through 0x007A (corresponding to Unicode characters LATIN SMALL LETTER A through LATIN SMALL LETTER Z), both inclusive. No other case folding equivalences are applied. The ASCII-uppercase of a String value S is the String value derived from S by replacing each occurrence of an ASCII lowercase letter code unit (0x0061 through 0x007A, inclusive) with the corresponding ASCII uppercase letter code unit (0x0041 through 0x005A, inclusive) while preserving all other code units. The ASCII-lowercase of a String value S is the String value derived from S by replacing each occurrence of an ASCII uppercase letter code unit (0x0041 through 0x005A, inclusive) with the corresponding ASCII lowercase letter code unit (0x0061 through 0x007A, inclusive) while preserving all other code units. A String value A is an ASCII-case-insensitive match for String value B if the ASCII-uppercase of A is exactly the same sequence of code units as the ASCII-uppercase of B. A sequence of Unicode code points A is an ASCII-case-insensitive match for B if B is an ASCII-case-insensitive match for
This specification identifies locales using Unicode BCP 47 locale identifiers as defined by Section 3 Unicode Language and Locale Identifiers.
Each such identifier can also be referred to as a language tag, and is in fact a valid language tag as that term is used in BCP 47.
A locale identifier in canonical form as specified in Unicode Technical Standard #35 Part 1 Core, Section 3.2.1 Canonical Unicode Locale Identifiers is referred to as a "Unicode canonicalized locale identifier".
Locale identifiers consist of case-insensitive Unicode Basic Latin alphanumeric subtags separated by All The abstract operation IsStructurallyValidLanguageTag takes argument locale (a String) and returns a Boolean. It determines whether locale is a syntactically well-formed The abstract operation CanonicalizeUnicodeLocaleId takes argument locale (a The This specification identifies currencies using 3-letter currency codes as defined by ISO 4217. Their canonical form is uppercase. All well-formed 3-letter ISO 4217 currency codes are allowed. However, the set of combinations of currency code and The abstract operation IsWellFormedCurrencyCode takes argument currency (a String) and returns a Boolean. It verifies that the currency argument represents a well-formed 3-letter ISO 4217 currency code. It performs the following steps when called: The
Implementations that adopt this specification must be Each Zone in the IANA Time Zone Database must be a
The IANA Time Zone Database offers build options that affect which
The Unicode Common Locale Data Repository (available named time zone identifiers are primary or non-primary.
Although use of CLDR data is recommended for consistency between implementations, it is not required.
Non-CLDR-based implementations can still use CLDR's identifier data in
The IANA Time Zone Database is typically updated between five and ten times per year.
These updates may add new Zone or Link names, may change Zones to Links, and may change the UTC offsets and transitions associated with any Zone.
Implementations are recommended to include updates to the IANA Time Zone Database as soon as possible.
Such prompt action ensures that ECMAScript programs can accurately perform time-zone-sensitive calculations and can use newly-added
Although the IANA Time Zone Database maintainers strive for stability, in rare cases (averaging less than once per year) a Zone may be replaced by a new Zone.
For example, in 2022 "
To reduce disruption from these infrequent changes, implementations should initially add each replacement time zone identifier as a
A waiting period should only apply when a new Zone is added to replace an existing Zone.
If an existing Zone and Link are swapped, then no renaming has happened and no waiting period is necessary.
If implementations revise time zone information during the lifetime of an This section complements but does not supersede The This definition supersedes the definition provided in The algorithm above for resolving Links to
This algorithm resolves Links to
For example, to resolve "Pacific/Truk" (in country code "FM") if the default build options of the IANA Time Zone Database identify it as a Link to "Pacific/Port_Moresby" (in country code "PG"), then the “country-code” column of
Note that The abstract operation GetAvailableNamedTimeZoneIdentifier takes argument timeZoneIdentifier (a String) and returns either a The abstract operation AvailablePrimaryTimeZoneIdentifiers takes no arguments and returns a The abstract operation StringSplitToList takes arguments S (a String) and separator (a String) and returns a This specification identifies measurement units using a core unit identifier (or equivalently core unit ID) as defined by Unicode Technical Standard #35 Part 2 General, Section 6.2 Unit Identifiers. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
Only a limited set of core unit identifiers are sanctioned.
Attempting to use an unsanctioned core unit identifier results in a The abstract operation IsWellFormedUnitIdentifier takes argument unitIdentifier (a String) and returns a Boolean. It verifies that the unitIdentifier argument represents a well-formed The abstract operation IsSanctionedSingleUnitIdentifier takes argument unitIdentifier (a String) and returns a Boolean. It verifies that the unitIdentifier argument is among the single unit identifiers sanctioned in the current version of this specification, which are a subset of the Common Locale Data Repository Unicode Technical Standard #35 Part 2 General, Section 6.2 Unit Identifiers, a single unit identifier is a The abstract operation AvailableCanonicalUnits takes no arguments and returns a This specification identifies numbering systems using a numbering system identifier corresponding with the name referenced by Unicode Technical Standard #35 Part 3 Numbers, Section 1 Numbering Systems. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z). The This specification identifies collations using a collation type as defined by Unicode Technical Standard #35 Part 5 Collation, Section 3.1 Collation Types. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS). The This specification identifies calendars using a calendar type as defined by Unicode Technical Standard #35 Part 4 Dates, Section 2 Calendar Elements. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS). The Pattern String Unless specified otherwise in this document, the objects, functions, and The Intl object: The initial value of the This property has the attributes { [[Writable]]: With the exception of Intl.Locale, each of the following See See See See See See See See See See When the When the An Available Locales List is an arbitrarily-ordered duplicate-free A Language Priority List is a A Resolution Option Descriptor is a Each The abstract operation CanonicalizeLocaleList takes argument locales (an The abstract operation CanonicalizeUValue takes arguments ukey (a The abstract operation LookupMatchingLocaleByPrefix takes arguments availableLocales (an The The abstract operation UnicodeExtensionComponents takes argument extension (a The abstract operation InsertUnicodeExtensionAndCanonicalize takes arguments locale (a The abstract operation ResolveLocale takes arguments availableLocales (an The abstract operation ResolveOptions takes arguments constructor (a The abstract operation FilterLocales takes arguments availableLocales (an The abstract operation GetOptionsObject takes argument options (an The abstract operation CoerceOptionsToObject takes argument options (an The abstract operation GetOption takes arguments options (an Object), property (a The abstract operation GetBooleanOrStringNumberFormatOption takes arguments options (an Object), property (a The abstract operation DefaultNumberOption takes arguments value (an The abstract operation GetNumberOption takes arguments options (an Object), property (a String), minimum (an The abstract operation PartitionPattern takes argument pattern (a The Intl.Collator Behaviour common to all When the The Intl.Collator The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[ResolutionOptionDescriptors]] internal slot is « { [[Key]]: The values of the [[SortLocaleData]] and [[SearchLocaleData]] internal slots are The Intl.Collator prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. This named Intl.Collator.prototype.compare is an A Collator compare function is an anonymous built-in function that has a [[Collator]] internal slot. When a Collator compare function F is called with arguments x and y, the following steps are taken: The The Behaviour as described below depends upon locale-sensitive identification of the sequence of collation elements for a string, in particular "base letters", and different base letters always compare as unequal (causing the strings containing them to also compare as unequal). Results of comparing variations of the same base letter with different case, diacritic marks, or potentially other aspects further depends upon collator.[[Sensitivity]] as follows: If collator.[[IgnorePunctuation]] is For the interpretation of options settable through locale extension keys, see Unicode Technical Standard #35 Part 1 Core, Section 3.6.1 Key and Type Definitions. The actual return values are The initial value of the This property has the attributes { [[Writable]]: Intl.Collator instances are Intl.Collator instances have an [[InitializedCollator]] internal slot. Intl.Collator instances also have several internal slots that are computed by Intl.Collator instances also have the following internal slots if the key corresponding to the name of the internal slot in Finally, Intl.Collator instances have a [[BoundCompare]] internal slot that caches the function returned by the compare accessor ( The Intl.DateTimeFormat Behaviour common to all When the The abstract operation ChainDateTimeFormat takes arguments dateTimeFormat (an Intl.DateTimeFormat), newTarget (an The abstract operation CreateDateTimeFormat takes arguments newTarget (a The abstract operation FormatOffsetTimeZoneIdentifier takes argument offsetMinutes (an The Intl.DateTimeFormat The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[RelevantExtensionKeys]] internal slot is « The value of the [[ResolutionOptionDescriptors]] internal slot is « { [[Key]]: The value of the [[LocaleData]] internal slot is Each DateTime Format Record has the fields defined in Each DateTime Range Pattern Record has the fields defined in Each DateTime Range Pattern Format Record has the fields defined in Each DateTime Range Pattern Part Record has the fields defined in Each DateTime Styles Record has the fields defined in Each DateTime Style Record has the fields defined in Each DateTime Connector Record has the fields defined in Each DateTime Date Range Record has the fields defined in Each DateTime Time Range Record has the fields defined in Each DateTime Style Range Record has the fields defined in The Intl.DateTimeFormat prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. For web compatibility reasons, if the property Intl.DateTimeFormat.prototype.format is an When the When the When the The initial value of the This property has the attributes { [[Writable]]: Intl.DateTimeFormat instances are Intl.DateTimeFormat instances have an [[InitializedDateTimeFormat]] internal slot. Intl.DateTimeFormat instances also have several internal slots that are computed by Finally, Intl.DateTimeFormat instances have a [[BoundFormat]] internal slot that caches the function returned by the format accessor ( Several DateTimeFormat algorithms use values from the following table, which provides internal slots, property names and allowable values for the components of date and time formats: The abstract operation DateTimeStyleFormat takes arguments dateStyle ( The abstract operation BasicFormatMatcher takes arguments options (a The A DateTime format function is an anonymous built-in function that has a [[DateTimeFormat]] internal slot. When a DateTime format function F is called with optional argument date, the following steps are taken: The The abstract operation FormatDateTimePattern takes arguments dateTimeFormat (an Intl.DateTimeFormat), format (a The abstract operation PartitionDateTimePattern takes arguments dateTimeFormat (an Intl.DateTimeFormat) and x (a Number) and returns either a The abstract operation FormatDateTime takes arguments dateTimeFormat (an Intl.DateTimeFormat) and x (a Number) and returns either a The abstract operation FormatDateTimeToParts takes arguments dateTimeFormat (an Intl.DateTimeFormat) and x (a Number) and returns either a The abstract operation PartitionDateTimeRangePattern takes arguments dateTimeFormat (an Intl.DateTimeFormat), x (a Number), and y (a Number) and returns either a The abstract operation FormatDateTimeRange takes arguments dateTimeFormat (an Intl.DateTimeFormat), x (a Number), and y (a Number) and returns either a The abstract operation FormatDateTimeRangeToParts takes arguments dateTimeFormat (an Intl.DateTimeFormat), x (a Number), and y (a Number) and returns either a The Each ToLocalTime Record has the fields defined in The abstract operation UnwrapDateTimeFormat takes argument dtf (an The Intl.DisplayNames Behaviour common to all When the The Intl.DisplayNames The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[RelevantExtensionKeys]] internal slot is « ». The value of the [[ResolutionOptionDescriptors]] internal slot is « ». The value of the [[LocaleData]] internal slot is The Intl.DisplayNames prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. When the The initial value of the This property has the attributes { [[Writable]]: Intl.DisplayNames instances are Intl.DisplayNames instances have an [[InitializedDisplayNames]] internal slot. Intl.DisplayNames instances also have several internal slots that are computed by The abstract operation CanonicalCodeForDisplayNames takes arguments type (a String) and code (a String) and returns either a The abstract operation IsValidDateTimeFieldCode takes argument field (a String) and returns a Boolean. It verifies that the field argument represents a valid date time field code. It performs the following steps when called: The Intl.DurationFormat Behaviour common to all When the The Intl.DurationFormat The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in The value of the [[RelevantExtensionKeys]] internal slot is « The value of the [[ResolutionOptionDescriptors]] internal slot is « { [[Key]]: The value of the [[LocaleData]] internal slot is The Intl.DurationFormat prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. When the When the The initial value of the This property has the attributes { [[Writable]]: Intl.DurationFormat instances inherit properties from Intl.DurationFormat instances have an [[InitializedDurationFormat]] internal slot. Intl.DurationFormat instances also have several internal slots that are computed by A Duration Record is a Duration Records have the fields listed in The abstract operation ToIntegerIfIntegral takes argument argument (an The abstract operation ToDurationRecord takes argument input (an The abstract operation DurationSign takes argument duration (a The abstract operation IsValidDuration takes arguments years (an The abstract operation GetDurationUnitOptions takes arguments unit (a String), options (an Object), baseStyle (a String), stylesList (a Each Duration Unit Options Record has the fields defined in The abstract operation ValidateDurationUnitStyle takes arguments unit (a String), style (a String), display (a String), and prevStyle (a String) and returns either a The abstract operation ComputeFractionalDigits takes arguments durationFormat (a DurationFormat Object) and duration (a The abstract operation NextUnitFractional takes arguments durationFormat (a DurationFormat Object) and unit (a String) and returns a Boolean. It returns The abstract operation FormatNumericHours takes arguments durationFormat (a DurationFormat object), hoursValue (an The abstract operation FormatNumericMinutes takes arguments durationFormat (a DurationFormat Object), minutesValue (an The abstract operation FormatNumericSeconds takes arguments durationFormat (a DurationFormat Object), secondsValue (a The abstract operation FormatNumericUnits takes arguments durationFormat (a DurationFormat Object), duration (a The abstract operation IsFractionalSecondUnitName takes argument unit (a String) and returns a Boolean. It performs the following steps when called: The abstract operation ListFormatParts takes arguments durationFormat (a DurationFormat Object) and partitionedPartsList (a The abstract operation PartitionDurationFormatPattern takes arguments durationFormat (a DurationFormat) and duration (a The Intl.ListFormat Behaviour common to all When the The Intl.ListFormat The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[RelevantExtensionKeys]] internal slot is « ». The value of the [[ResolutionOptionDescriptors]] internal slot is « ». The value of the [[LocaleData]] internal slot is The Intl.ListFormat prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. When the When the The initial value of the This property has the attributes { [[Writable]]: Intl.ListFormat instances inherit properties from Intl.ListFormat instances have an [[InitializedListFormat]] internal slot. Intl.ListFormat instances also have several internal slots that are computed by The abstract operation DeconstructPattern takes arguments pattern (a It deconstructs the pattern string into a
placeables is a It performs the following steps when called: The abstract operation CreatePartsFromList takes arguments listFormat (an Intl.ListFormat) and list (a The abstract operation FormatList takes arguments listFormat (an Intl.ListFormat) and list (a The abstract operation FormatListToParts takes arguments listFormat (an Intl.ListFormat) and list (a The abstract operation StringListFromIterable takes argument iterable (an This algorithm raises exceptions when it encounters values that are not Strings, because there is no obvious locale-aware coercion for arbitrary values. The Intl.Locale When the The abstract operation UpdateLanguageId takes arguments tag (a The abstract operation MakeLocaleRecord takes arguments tag (a The Intl.Locale The value of This property has the attributes { [[Writable]]: The value of the [[LocaleExtensionKeys]] internal slot is a The Intl.Locale prototype object: The initial value of This property only exists if This property only exists if The initial value of the This property has the attributes { [[Writable]]: Intl.Locale instances are Intl.Locale instances have an [[InitializedLocale]] internal slot. Intl.Locale instances also have several internal slots that are computed by The abstract operation GetLocaleBaseName takes argument locale (a String) and returns a String. It performs the following steps when called: The abstract operation GetLocaleLanguage takes argument locale (a String) and returns a String. It performs the following steps when called: The abstract operation GetLocaleScript takes argument locale (a String) and returns a String or The abstract operation GetLocaleRegion takes argument locale (a String) and returns a String or The abstract operation GetLocaleVariants takes argument locale (a String) and returns a String or The Intl.NumberFormat Behaviour common to all When the The abstract operation ChainNumberFormat takes arguments numberFormat (an Intl.NumberFormat), newTarget (an The abstract operation SetNumberFormatDigitOptions takes arguments intlObj (an Object), options (an Object), mnfdDefault (an The abstract operation SetNumberFormatUnitOptions takes arguments intlObj (an Intl.NumberFormat) and options (an Object) and returns either a The Intl.NumberFormat The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[RelevantExtensionKeys]] internal slot is « The value of the [[ResolutionOptionDescriptors]] internal slot is « { [[Key]]: The value of the [[LocaleData]] internal slot is The Intl.NumberFormat prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. Intl.NumberFormat.prototype.format is an When the When the When the The initial value of the This property has the attributes { [[Writable]]: Intl.NumberFormat instances are Intl.NumberFormat instances have an [[InitializedNumberFormat]] internal slot. Intl.NumberFormat instances also have several internal slots that are computed by Finally, Intl.NumberFormat instances have a [[BoundFormat]] internal slot that caches the function returned by the format accessor ( The A Number format function is an anonymous built-in function that has a [[NumberFormat]] internal slot. When a Number format function F is called with optional argument value, the following steps are taken: The The abstract operation FormatNumericToString takes arguments intlObject (an Object) and x (a The abstract operation PartitionNumberPattern takes arguments numberFormat (an object initialized as a NumberFormat) and x (an The abstract operation PartitionNotationSubPattern takes arguments numberFormat (an Intl.NumberFormat), x (an The abstract operation FormatNumeric takes arguments numberFormat (an Intl.NumberFormat) and x (an The abstract operation FormatNumericToParts takes arguments numberFormat (an Intl.NumberFormat) and x (an The abstract operation ToRawPrecision takes arguments x (a non-negative It involves solving the following equation, which returns a valid It performs the following steps when called: The abstract operation ToRawFixed takes arguments x (a non-negative It involves solving the following equation, which returns a valid It performs the following steps when called: The abstract operation UnwrapNumberFormat takes argument nf (an The abstract operation GetNumberFormatPattern takes arguments numberFormat (an Intl.NumberFormat) and x (an The abstract operation GetNotationSubPattern takes arguments numberFormat (an Intl.NumberFormat) and exponent (an The abstract operation ComputeExponent takes arguments numberFormat (an Intl.NumberFormat) and x (a The abstract operation ComputeExponentForMagnitude takes arguments numberFormat (an Intl.NumberFormat) and magnitude (an The The conversion of a It is defined piecewise over the following productions: The abstract operation ToIntlMathematicalValue takes argument value (an The abstract operation GetUnsignedRoundingMode takes arguments roundingMode (a The abstract operation ApplyUnsignedRoundingMode takes arguments x (a The abstract operation PartitionNumberRangePattern takes arguments numberFormat (an Intl.NumberFormat), x (an The abstract operation FormatApproximately takes arguments numberFormat (an Intl.NumberFormat) and result (a The For example, an implementation may remove the An implementation may also modify Returning result unmodified is guaranteed to be a correct implementation of CollapseNumberRange. The abstract operation FormatNumericRange takes arguments numberFormat (an Intl.NumberFormat), x (an The abstract operation FormatNumericRangeToParts takes arguments numberFormat (an Intl.NumberFormat), x (an The Intl.PluralRules Behaviour common to all When the The Intl.PluralRules The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[RelevantExtensionKeys]] internal slot is « ». The value of the [[ResolutionOptionDescriptors]] internal slot is « ». The value of the [[LocaleData]] internal slot is The Intl.PluralRules prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. When the When the The initial value of the This property has the attributes { [[Writable]]: Intl.PluralRules instances are Intl.PluralRules instances have an [[InitializedPluralRules]] internal slot. Intl.PluralRules instances also have several internal slots that are computed by The The abstract operation ResolvePlural takes arguments pluralRules (an Intl.PluralRules) and n (a Number) and returns a The The abstract operation ResolvePluralRange takes arguments pluralRules (an Intl.PluralRules), x (a Number), and y (a Number) and returns either a The Intl.RelativeTimeFormat Behaviour common to all When the The Intl.RelativeTimeFormat The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[RelevantExtensionKeys]] internal slot is « The value of the [[ResolutionOptionDescriptors]] internal slot is « { [[Key]]: The value of the [[LocaleData]] internal slot is The Intl.RelativeTimeFormat prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. When the When the The initial value of the This property has the attributes { [[Writable]]: Intl.RelativeTimeFormat instances are Intl.RelativeTimeFormat instances have an [[InitializedRelativeTimeFormat]] internal slot. Intl.RelativeTimeFormat instances also have several internal slots that are computed by The abstract operation SingularRelativeTimeUnit takes argument unit (a String) and returns either a The abstract operation PartitionRelativeTimePattern takes arguments relativeTimeFormat (an Intl.RelativeTimeFormat), value (a Number), and unit (a String) and returns either a The abstract operation MakePartsList takes arguments pattern (a The abstract operation FormatRelativeTime takes arguments relativeTimeFormat (an Intl.RelativeTimeFormat), value (a Number), and unit (a String) and returns either a The abstract operation FormatRelativeTimeToParts takes arguments relativeTimeFormat (an Intl.RelativeTimeFormat), value (a Number), and unit (a String) and returns either a The Intl.Segmenter Behaviour common to all When the The Intl.Segmenter The value of This property has the attributes { [[Writable]]: When the The value of the [[AvailableLocales]] internal slot is The value of the [[RelevantExtensionKeys]] internal slot is « ». The value of the [[ResolutionOptionDescriptors]] internal slot is « ». The value of the [[LocaleData]] internal slot is The Intl.Segmenter prototype object: The initial value of This function provides access to the locale and options computed during initialization of the object. The The initial value of the This property has the attributes { [[Writable]]: Intl.Segmenter instances are Intl.Segmenter instances have an [[InitializedSegmenter]] internal slot. Intl.Segmenter instances also have internal slots that are computed by A Segments instance is an object that represents the segments of a specific string, subject to the locale and options of its constructing Intl.Segmenter instance. The abstract operation CreateSegmentsObject takes arguments segmenter (an Intl.Segmenter) and string (a String) and returns a The %IntlSegmentsPrototype% object: The The The value of the Segments instances are Segments instances have a [[SegmentsSegmenter]] internal slot that references the constructing Intl.Segmenter instance. Segments instances have a [[SegmentsString]] internal slot that references the String value whose segments they expose. A Segment Iterator is an object that represents a particular iteration over the segments of a specific string. The abstract operation CreateSegmentIterator takes arguments segmenter (an Intl.Segmenter) and string (a String) and returns a The %IntlSegmentIteratorPrototype% object: The The initial value of the This property has the attributes { [[Writable]]: A Segment Data object is an object that represents a particular segment from a string. The abstract operation CreateSegmentDataObject takes arguments segmenter (an Intl.Segmenter), string (a String), startIndex (a non-negative The abstract operation FindBoundary takes arguments segmenter (an Intl.Segmenter), string (a String), startIndex (a non-negative This definition supersedes the definition provided in When the The This definition supersedes the definition provided in This function interprets a String value as a sequence of code points, as described in The abstract operation TransformCase takes arguments S (a String), locales (an Code point mappings may be derived according to a tailored version of the Default Case Conversion Algorithms of the Unicode Standard. Implementations may use locale-sensitive tailoring defined in the file This definition supersedes the definition provided in This function interprets a String value as a sequence of code points, as described in The following definition(s) refer to the abstract operation thisNumberValue as defined in This definition supersedes the definition provided in When the The following definition(s) refer to the abstract operation thisBigIntValue as defined in This definition supersedes the definition provided in When the The following definition(s) refer to the abstract operation thisTimeValue as defined in This definition supersedes the definition provided in When the This definition supersedes the definition provided in When the This definition supersedes the definition provided in When the This definition supersedes the definition provided in When the The following aspects of this specification are implementation dependent: This specification is authored on Ecmarkdown for authoring algorithm steps. PDF renderings of this specification are produced by printing the HTML rendering to a PDF. Prior editions of this specification were authored using Word—the Ecmarkup source text that formed the basis of this edition was produced by converting the ECMAScript 2015 Word document to Ecmarkup using an automated conversion tool. Ecma International Rue du Rhone 114 CH-1204 Geneva Tel: +41 22 849 6000 Fax: +41 22 849 6001 Web: https://ecma-international.org/ © 2025 Ecma International This draft document may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to Ecma International, except as needed for the purpose of developing any document or deliverable produced by Ecma International. This disclaimer is valid only prior to final version of this document. After approval all rights on the standard are reserved by Ecma International. The limited permissions are granted through the standardization phase and will not be revoked by Ecma International or its successors or assigns during this time. This document and the information contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.1 Scope
2 Conformance
supportedLocalesOf methods.3 Normative References
https://www.ecma-international.org/publications/standards/Ecma-262.htm
4 Overview
4.1 Internationalization, Localization, and Globalization
4.2 API Overview
toLocaleString, toLocaleDateString, and toLocaleTimeString), their actual behaviour is left largely implemenation-defined. This specification provides additional functionality, control over the language and over details of the behaviour to be used, and a more complete specification of required functionality.
compare, select, format, etc.), which can be called repeatedly. It also provides a resolvedOptions function, which the application can use to find out the exact configuration of the object.
4.3 API Conventions
4.4 Implementation Dependencies
4.4.1 Compatibility across implementations
5 Notational Conventions
5.1 Well-Known Intrinsic Objects
Intrinsic Name
Global Name
ECMAScript Language Association
IntlThe
Intl object (
Intl.CollatorThe
Intl.Collator
Intl.DateTimeFormatThe
Intl.DateTimeFormat
Intl.DisplayNamesThe
Intl.DisplayNames
Intl.DurationFormatThe
Intl.DurationFormat
Intl.ListFormatThe
Intl.ListFormat
Intl.LocaleThe
Intl.Locale
Intl.NumberFormatThe
Intl.NumberFormat
Intl.PluralRulesThe
Intl.PluralRules
Intl.RelativeTimeFormatThe
Intl.RelativeTimeFormat
Intl.SegmenterThe
Intl.Segmenter
The prototype of
The prototype of Segments objects (
6 Identification of Locales, Currencies, Time Zones, Measurement Units, Numbering Systems, Collations, and Calendars
6.1 Case Sensitivity and Case Mapping
6.2 Language Tags
unicode_locale_extensions Unicode locale nonterminal and is not part of a 6.2.1 IsStructurallyValidLanguageTag ( locale )
unicode_locale_id tlang 6.2.2 CanonicalizeUnicodeLocaleId ( locale )
6.2.3 DefaultLocale ( )
navigator.language to avoid providing any additional distinguishing information.
6.3 Currency Codes
6.3.1 IsWellFormedCurrencyCode ( currency )
6.4 AvailableCanonicalCurrencies ( )
6.5 Use of the IANA Time Zone Database
zone.tab must be a zone.tab and that represents a geographical area entirely contained within the territory of a single ISO 3166-1 Alpha-2 country code must resolve to a primary identifier that also represents a geographical area entirely contained within the territory of the same country code.
For example, timezone.xml.
Implementations may also build the IANA Time Zone Database directly, for example by using build options such as PACKRATDATA=backzone PACKRATLIST=zone.tab and performing any post-processing needed to ensure compliance with the requirements above.
6.5.1 AvailableNamedTimeZoneIdentifiers ( )
zone.tab of the IANA Time Zone Database, thenzone.tab and backzone of the IANA Time Zone Database.
If the country code of a Link has only one line in zone.tab, then that line will determine the zone.tab, then historical mappings in backzone must be used to identify the correct zone.tab must be checked for lines corresponding with "FM".
If there were only one such line, then the “TZ” column of that line would determine the zone.tab, then backzone must be inspected and a line such as "Link Pacific/Chuuk Pacific/Truk" would result in using "Pacific/Chuuk" as the zone.tab is the preferred source of mapping data because backzone mappings may, in rare cases, cross the boundaries of ISO 3166-1 Alpha-2 country codes.
For example, "Atlantic/Jan_Mayen" (in country code "SJ") is mapped in backzone to "Europe/Oslo" (in country code "NO").
As of the 2024a release of the IANA Time Zone Database, "Atlantic/Jan_Mayen" is the only case where this happens.
6.5.2 GetAvailableNamedTimeZoneIdentifier ( timeZoneIdentifier )
6.5.3 AvailablePrimaryTimeZoneIdentifiers ( )
6.5.4 StringSplitToList ( S, separator )
6.6 Measurement Unit Identifiers
6.6.1 IsWellFormedUnitIdentifier ( unitIdentifier )
6.6.2 IsSanctionedSingleUnitIdentifier ( unitIdentifier )
Single Unit Identifier
acre bit byte celsius centimeter day degree fahrenheit fluid-ounce foot gallon gigabit gigabyte gram hectare hour inch kilobit kilobyte kilogram kilometer liter megabit megabyte meter microsecond mile mile-scandinavian milliliter millimeter millisecond minute month nanosecond ounce percent petabyte pound second stone terabit terabyte week yard year 6.6.3 AvailableCanonicalUnits ( )
6.7 Numbering System Identifiers
6.7.1 AvailableCanonicalNumberingSystems ( )
6.8 Collation Types
6.8.1 AvailableCanonicalCollations ( )
6.9 Calendar Types
6.9.1 AvailableCalendars ( )
6.10 Pattern String Types
7 Requirements for Standard Built-in ECMAScript Objects
8 The Intl Object
new operator.8.1 Value Properties of the Intl Object
8.1.1 Intl [ %Symbol.toStringTag% ]
8.2 Constructor Properties of the Intl Object
8.2.1 Intl.Collator ( . . . )
8.2.2 Intl.DateTimeFormat ( . . . )
8.2.3 Intl.DisplayNames ( . . . )
8.2.4 Intl.DurationFormat ( . . . )
8.2.5 Intl.ListFormat ( . . . )
8.2.6 Intl.Locale ( . . . )
8.2.7 Intl.NumberFormat ( . . . )
8.2.8 Intl.PluralRules ( . . . )
8.2.9 Intl.RelativeTimeFormat ( . . . )
8.2.10 Intl.Segmenter ( . . . )
8.3 Function Properties of the Intl Object
8.3.1 Intl.getCanonicalLocales ( locales )
getCanonicalLocales method is called with argument locales, the following steps are taken:8.3.2 Intl.supportedValuesOf ( key )
supportedValuesOf method is called with argument key , the following steps are taken:9 Locale and Parameter Negotiation
9.1 Internal slots of Service Constructors
9.2 Abstract Operations
9.2.1 CanonicalizeLocaleList ( locales )
9.2.2 CanonicalizeUValue ( ukey, uvalue )
common/bcp47 provided by the Common Locale Data Repository (available at https://cldr.unicode.org/).9.2.3 LookupMatchingLocaleByPrefix ( availableLocales, requestedLocales )
9.2.4 LookupMatchingLocaleByBestFit ( availableLocales, requestedLocales )
9.2.5 UnicodeExtensionComponents ( extension )
9.2.6 InsertUnicodeExtensionAndCanonicalize ( locale, attributes, keywords )
9.2.7 ResolveLocale ( availableLocales, requestedLocales, options, relevantExtensionKeys, localeData )
keyword key value is not contained within relevantExtensionKeys or type value is superseded by a different value from options. It performs the following steps when called:9.2.8 ResolveOptions ( constructor, localeData, locales, options [ , specialBehaviours [ , modifyResolutionOptions ] ] )
9.2.9 FilterLocales ( availableLocales, requestedLocales, options )
9.2.10 GetOptionsObject ( options )
9.2.11 CoerceOptionsToObject ( options )
9.2.12 GetOption ( options, property, type, values, default )
9.2.13 GetBooleanOrStringNumberFormatOption ( options, property, stringValues, fallback )
9.2.14 DefaultNumberOption ( value, minimum, maximum, fallback )
9.2.15 GetNumberOption ( options, property, minimum, maximum, fallback )
9.2.16 PartitionPattern ( pattern )
10 Collator Objects
10.1 The Intl.Collator Constructor
10.1.1 Intl.Collator ( [ locales [ , options ] ] )
Intl.Collator function is called with optional arguments locales and options, the following steps are taken:10.2 Properties of the Intl.Collator Constructor
10.2.1 Intl.Collator.prototype
Intl.Collator.prototype is 10.2.2 Intl.Collator.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:10.2.3 Internal slots
10.3 Properties of the Intl.Collator Prototype Object
10.3.1 Intl.Collator.prototype.constructor
Intl.Collator.prototype.constructor is 10.3.2 Intl.Collator.prototype.resolvedOptions ( )
Internal Slot
Property
Extension Key
[[Locale]]
[[Usage]]
[[Sensitivity]]
[[IgnorePunctuation]]
[[Collation]]
[[Numeric]]
[[CaseFirst]]
10.3.3 get Intl.Collator.prototype.compare
Array.prototype.sort or other functions.
10.3.3.1 Collator Compare Functions
10.3.3.2 CompareStrings ( collator, x, y )
[[Sensitivity]]
Description
Characters with the same base letter do not compare as unequal, regardless of differences in case and/or diacritic marks.
equal
Characters with the same base letter compare as unequal only if they differ in accents and/or other diacritic marks, regardless of differences in case.
not equal
equal
Characters with the same base letter compare as unequal only if they differ in case, regardless of differences in accents and/or other diacritic marks.
equal
not equal
Characters with the same base letter compare as unequal if they differ in case, diacritic marks, and/or potentially other differences.
not equal
10.3.4 Intl.Collator.prototype [ %Symbol.toStringTag% ]
10.4 Properties of Intl.Collator Instances
11 DateTimeFormat Objects
11.1 The Intl.DateTimeFormat Constructor
11.1.1 Intl.DateTimeFormat ( [ locales [ , options ] ] )
Intl.DateTimeFormat function is called with optional arguments locales and options, the following steps are taken:11.1.1.1 ChainDateTimeFormat ( dateTimeFormat, newTarget, this )
11.1.2 CreateDateTimeFormat ( newTarget, locales, options, required, defaults )
11.1.3 FormatOffsetTimeZoneIdentifier ( offsetMinutes )
11.2 Properties of the Intl.DateTimeFormat Constructor
11.2.1 Intl.DateTimeFormat.prototype
Intl.DateTimeFormat.prototype is 11.2.2 Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:11.2.3 Internal slots
11.2.3.1 DateTime Format Records
Field Name
Value Type
Description
[[weekday]]
[[Weekday]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[era]]
[[Era]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[year]]
[[Year]] values in the Values column of
Optional field. Present if [[pattern]] contains at least one of the substrings
[[month]]
[[Month]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[day]]
[[Day]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[dayPeriod]]
[[DayPeriod]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[hour]]
[[Hour]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[minute]]
[[Minute]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[second]]
[[Second]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[fractionalSecondDigits]]
[[FractionalSecondDigits]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[timeZoneName]]
[[TimeZoneName]] values in the Values column of
Optional field. Present if [[pattern]] contains the
[[pattern]]
a
[[pattern12]]
a
Optional field. Present if the [[hour]] field is present. In addition to the substrings of the [[pattern]] field, contains at least one of the substrings
[[rangePatterns]]
a
Pattern strings in this field are similar to [[pattern]].
[[rangePatterns12]]
a
Optional field. Present if the [[hour]] field is present. Pattern strings in this field are similar to [[pattern12]].
11.2.3.2 DateTime Range Pattern Records
Field Name
Value Type
Description
[[Default]]
a
It contains the default range pattern used when a more specific range pattern is not available.
[[Era]]
a
Optional field. Used when era is the largest calendar element that is different between the start and end dates.
[[Year]]
a
Optional field. Used when year is the largest calendar element that is different between the start and end dates.
[[Month]]
a
Optional field. Used when month is the largest calendar element that is different between the start and end dates.
[[Day]]
a
Optional field. Used when day is the largest calendar element that is different between the start and end dates.
[[AmPm]]
a
Optional field. Used when ante or post meridiem is the largest calendar element that is different between the start and end dates.
[[DayPeriod]]
a
Optional field. Used when day period is the largest calendar element that is different between the start and end dates.
[[Hour]]
a
Optional field. Used when hour is the largest calendar element that is different between the start and end dates.
[[Minute]]
a
Optional field. Used when minute is the largest calendar element that is different between the start and end dates.
[[Second]]
a
Optional field. Used when second is the largest calendar element that is different between the start and end dates.
[[FractionalSecondDigits]]
a
Optional field. Used when fractional seconds are the largest calendar element that is different between the start and end dates.
11.2.3.3 DateTime Range Pattern Format Records
Field Name
Value Type
Description
[[weekday]]
[[Weekday]] values in the Values column of
Optional field. Present if a
[[era]]
[[Era]] values in the Values column of
Optional field. Present if a
[[year]]
[[Year]] values in the Values column of
Optional field. Present if a
[[month]]
[[Month]] values in the Values column of
Optional field. Present if a
[[day]]
[[Day]] values in the Values column of
Optional field. Present if a
[[dayPeriod]]
[[DayPeriod]] values in the Values column of
Optional field. Present if a
[[hour]]
[[Hour]] values in the Values column of
Optional field. Present if a
[[minute]]
[[Minute]] values in the Values column of
Optional field. Present if a
[[second]]
[[Second]] values in the Values column of
Optional field. Present if a
[[fractionalSecondDigits]]
[[FractionalSecondDigits]] values in the Values column of
Optional field. Present if a
[[timeZoneName]]
[[TimeZoneName]] values in the Values column of
Optional field. Present if a
[[PatternParts]]
a
Each record represents a part of the range pattern.
11.2.3.4 DateTime Range Pattern Part Records
Field Name
Value Type
Description
[[Source]]
It indicates which of the range's dates should be formatted using the value of the [[Pattern]] field.
[[Pattern]]
a
A String of the same format as the regular date pattern String.
11.2.3.5 DateTime Styles Records
Field Name
Value Type
[[Date]]
a
[[Time]]
a
[[Connector]]
a
[[DateTimeRangeFormat]]
a
11.2.3.6 DateTime Style Records
Field Name
Value Type
Description
[[full]]
a
Format record for the
[[long]]
a
Format record for the
[[medium]]
a
Format record for the
[[short]]
a
Format record for the
11.2.3.7 DateTime Connector Records
Field Name
Value Type
Description
[[full]]
a
Connector pattern when the date style is
[[long]]
a
Connector pattern when the date style is
[[medium]]
a
Connector pattern when the date style is
[[short]]
a
Connector pattern when the date style is
11.2.3.8 DateTime Date Range Records
Field Name
Value Type
Description
[[full]]
a
Used when date style is
[[long]]
a
Used when date style is
[[medium]]
a
Used when date style is
[[short]]
a
Used when date style is
11.2.3.9 DateTime Time Range Records
Field Name
Value Type
Description
[[full]]
a
Used when time style is
[[long]]
a
Used when time style is
[[medium]]
a
Used when time style is
[[short]]
a
Used when time style is
11.2.3.10 DateTime Style Range Records
Field Name
Value Type
Description
[[rangePatterns]]
a
Range patterns to combine date and time styles.
[[rangePatterns12]]
a
Optional Field. Range patterns to combine date and time styles for 12-hour formats.
11.3 Properties of the Intl.DateTimeFormat Prototype Object
11.3.1 Intl.DateTimeFormat.prototype.constructor
Intl.DateTimeFormat.prototype.constructor is 11.3.2 Intl.DateTimeFormat.prototype.resolvedOptions ( )
Internal Slot
Property
Conversion
[[Locale]]
[[Calendar]]
[[NumberingSystem]]
[[TimeZone]]
[[HourCycle]]
[[HourCycle]]
[[DateStyle]]
[[TimeStyle]]
11.3.3 get Intl.DateTimeFormat.prototype.format
Array.prototype.map or other functions.
This is considered a historical artefact, as part of a convention which is no longer followed for new features, but is preserved to maintain compatibility with existing programs.
11.3.4 Intl.DateTimeFormat.prototype.formatRange ( startDate, endDate )
formatRange method is called with arguments startDate and endDate, the following steps are taken:11.3.5 Intl.DateTimeFormat.prototype.formatRangeToParts ( startDate, endDate )
formatRangeToParts method is called with arguments startDate and endDate, the following steps are taken:11.3.6 Intl.DateTimeFormat.prototype.formatToParts ( date )
formatToParts method is called with an argument date, the following steps are taken:11.3.7 Intl.DateTimeFormat.prototype [ %Symbol.toStringTag% ]
11.4 Properties of Intl.DateTimeFormat Instances
11.5 Abstract Operations for DateTimeFormat Objects
Field Name
Property
Values
[[Weekday]]
[[Era]]
[[Year]]
[[Month]]
[[Day]]
[[DayPeriod]]
[[Hour]]
[[Minute]]
[[Second]]
[[FractionalSecondDigits]]
1, 2, 3
[[TimeZoneName]]
11.5.1 DateTimeStyleFormat ( dateStyle, timeStyle, styles )
11.5.2 BasicFormatMatcher ( options, formats )
11.5.3 BestFitFormatMatcher ( options, formats )
11.5.4 DateTime Format Functions
11.5.5 FormatDateTimePattern ( dateTimeFormat, format, pattern, epochNanoseconds )
11.5.6 PartitionDateTimePattern ( dateTimeFormat, x )
11.5.7 FormatDateTime ( dateTimeFormat, x )
11.5.8 FormatDateTimeToParts ( dateTimeFormat, x )
11.5.9 PartitionDateTimeRangePattern ( dateTimeFormat, x, y )
11.5.10 FormatDateTimeRange ( dateTimeFormat, x, y )
11.5.11 FormatDateTimeRangeToParts ( dateTimeFormat, x, y )
11.5.12 ToLocalTime ( epochNs, calendar, timeZoneIdentifier )
11.5.13 ToLocalTime Records
Field Name
Value Type
Value Calculation for Gregorian Calendar
[[Weekday]]
an
[[Era]]
a String
Let year be
[[Year]]
an
[[RelatedYear]]
an
[[YearName]]
a String or
[[Month]]
an
[[Day]]
an
[[Hour]]
an
[[Minute]]
an
[[Second]]
an
[[Millisecond]]
an
[[InDST]]
a Boolean
Calculate
11.5.14 UnwrapDateTimeFormat ( dtf )
12 DisplayNames Objects
12.1 The Intl.DisplayNames Constructor
12.1.1 Intl.DisplayNames ( locales, options )
Intl.DisplayNames function is called with arguments locales and options, the following steps are taken:12.2 Properties of the Intl.DisplayNames Constructor
12.2.1 Intl.DisplayNames.prototype
Intl.DisplayNames.prototype is 12.2.2 Intl.DisplayNames.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:12.2.3 Internal slots
unicode_language_id type 12.3 Properties of the Intl.DisplayNames Prototype Object
12.3.1 Intl.DisplayNames.prototype.constructor
Intl.DisplayNames.prototype.constructor is 12.3.2 Intl.DisplayNames.prototype.resolvedOptions ( )
Internal Slot
Property
[[Locale]]
[[Style]]
[[Type]]
[[Fallback]]
[[LanguageDisplay]]
12.3.3 Intl.DisplayNames.prototype.of ( code )
Intl.DisplayNames.prototype.of is called with an argument code, the following steps are taken:12.3.4 Intl.DisplayNames.prototype [ %Symbol.toStringTag% ]
12.4 Properties of Intl.DisplayNames Instances
12.5 Abstract Operations for DisplayNames Objects
12.5.1 CanonicalCodeForDisplayNames ( type, code )
unicode_language_id unicode_region_subtag unicode_script_subtag type 12.5.2 IsValidDateTimeFieldCode ( field )
Code
Description
The field indicating the era, e.g. AD or BC in the Gregorian or Julian calendar.
The field indicating the year (within an era).
The field indicating the quarter, e.g. Q2, 2nd quarter, etc.
The field indicating the month, e.g. Sep, September, etc.
The field indicating the week number within a year.
The field indicating the day of week, e.g. Tue, Tuesday, etc.
The field indicating the day in month.
The field indicating the day period, either am, pm, etc. or noon, evening, etc..
The field indicating the hour.
The field indicating the minute.
The field indicating the second.
The field indicating the time zone name, e.g. PDT, Pacific Daylight Time, etc.
13 DurationFormat Objects
13.1 The Intl.DurationFormat Constructor
13.1.1 Intl.DurationFormat ( [ locales [ , options ] ] )
Intl.DurationFormat function is called with optional arguments locales and options, the following steps are taken:
Internal Slot
Unit
Styles
Digital Default
[[YearsOptions]]
«
[[MonthsOptions]]
«
[[WeeksOptions]]
«
[[DaysOptions]]
«
[[HoursOptions]]
«
[[MinutesOptions]]
«
[[SecondsOptions]]
«
[[MillisecondsOptions]]
«
[[MicrosecondsOptions]]
«
[[NanosecondsOptions]]
«
13.2 Properties of the Intl.DurationFormat Constructor
13.2.1 Intl.DurationFormat.prototype
Intl.DurationFormat.prototype is 13.2.2 Intl.DurationFormat.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:13.2.3 Internal slots
13.3 Properties of the Intl.DurationFormat Prototype Object
13.3.1 Intl.DurationFormat.prototype.constructor
Intl.DurationFormat.prototype.constructor is the intrinsic object 13.3.2 Intl.DurationFormat.prototype.resolvedOptions ( )
Internal Slot
Property
Conversion
[[Locale]]
[[NumberingSystem]]
[[Style]]
[[YearsOptions]]
[[MonthsOptions]]
[[WeeksOptions]]
[[DaysOptions]]
[[HoursOptions]]
[[MinutesOptions]]
[[SecondsOptions]]
[[MillisecondsOptions]]
[[MicrosecondsOptions]]
[[NanosecondsOptions]]
[[FractionalDigits]]
13.3.3 Intl.DurationFormat.prototype.format ( duration )
format method is called with an argument duration, the following steps are taken:13.3.4 Intl.DurationFormat.prototype.formatToParts ( duration )
formatToParts method is called with an argument duration, the following steps are taken:13.3.5 Intl.DurationFormat.prototype [ %Symbol.toStringTag% ]
13.4 Properties of Intl.DurationFormat Instances
13.5 Abstract Operations for DurationFormat Objects
13.5.1 Duration Records
Field
Meaning
[[Years]]
The number of years in the duration.
[[Months]]
The number of months in the duration.
[[Weeks]]
The number of weeks in the duration.
[[Days]]
The number of days in the duration.
[[Hours]]
The number of hours in the duration.
[[Minutes]]
The number of minutes in the duration.
[[Seconds]]
The number of seconds in the duration.
[[Milliseconds]]
The number of milliseconds in the duration.
[[Microseconds]]
The number of microseconds in the duration.
[[Nanoseconds]]
The number of nanoseconds in the duration.
13.5.2 ToIntegerIfIntegral ( argument )
13.5.3 ToDurationRecord ( input )
13.5.4 DurationSign ( duration )
13.5.5 IsValidDuration ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds )
std::remquo() with sufficient bits in the quotient. String manipulation will also give an exact result, since the multiplication is by a power of 10.13.5.6 GetDurationUnitOptions ( unit, options, baseStyle, stylesList, digitalBase, prevStyle, twoDigitHours )
13.5.6.1 Duration Unit Options Records
Field Name
Value Type
[[Style]]
a String from the Styles column of
[[Display]]
13.5.6.2 ValidateDurationUnitStyle ( unit, style, display, prevStyle )
13.5.7 ComputeFractionalDigits ( durationFormat, duration )
13.5.8 NextUnitFractional ( durationFormat, unit )
13.5.9 FormatNumericHours ( durationFormat, hoursValue, signDisplayed )
13.5.10 FormatNumericMinutes ( durationFormat, minutesValue, hoursDisplayed, signDisplayed )
13.5.11 FormatNumericSeconds ( durationFormat, secondsValue, minutesDisplayed, signDisplayed )
13.5.12 FormatNumericUnits ( durationFormat, duration, firstNumericUnit, signDisplayed )
13.5.13 IsFractionalSecondUnitName ( unit )
13.5.14 ListFormatParts ( durationFormat, partitionedPartsList )
13.5.15 PartitionDurationFormatPattern ( durationFormat, duration )
Value Field
Internal Slot
Unit
NumberFormat Unit
[[Years]]
[[YearsOptions]]
[[Months]]
[[MonthsOptions]]
[[Weeks]]
[[WeeksOptions]]
[[Days]]
[[DaysOptions]]
[[Hours]]
[[HoursOptions]]
[[Minutes]]
[[MinutesOptions]]
[[Seconds]]
[[SecondsOptions]]
[[Milliseconds]]
[[MillisecondsOptions]]
[[Microseconds]]
[[MicrosecondsOptions]]
[[Nanoseconds]]
[[NanosecondsOptions]]
14 ListFormat Objects
14.1 The Intl.ListFormat Constructor
14.1.1 Intl.ListFormat ( [ locales [ , options ] ] )
Intl.ListFormat function is called with optional arguments locales and options, the following steps are taken:14.2 Properties of the Intl.ListFormat Constructor
14.2.1 Intl.ListFormat.prototype
Intl.ListFormat.prototype is 14.2.2 Intl.ListFormat.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:14.2.3 Internal slots
conjunction corresponds to "standard", disjunction corresponds to "or", and unit corresponds to "unit".
conjunction stands for "and"-based lists (e.g., "A, B, and C"), disjunction stands for "or"-based lists (e.g., "A, B, or C"), and unit stands for lists of values with units (e.g., "5 pounds, 12 ounces").
14.3 Properties of the Intl.ListFormat Prototype Object
14.3.1 Intl.ListFormat.prototype.constructor
Intl.ListFormat.prototype.constructor is 14.3.2 Intl.ListFormat.prototype.resolvedOptions ( )
Internal Slot
Property
[[Locale]]
[[Type]]
[[Style]]
14.3.3 Intl.ListFormat.prototype.format ( list )
format method is called with an argument list, the following steps are taken:14.3.4 Intl.ListFormat.prototype.formatToParts ( list )
formatToParts method is called with an argument list, the following steps are taken:14.3.5 Intl.ListFormat.prototype [ %Symbol.toStringTag% ]
14.4 Properties of Intl.ListFormat Instances
14.5 Abstract Operations for ListFormat Objects
14.5.1 DeconstructPattern ( pattern, placeables )
Input:
DeconstructPattern("AA{xx}BB{yy}CC", {
[[xx]]: {[[Type]]: "hour", [[Value]]: "15"},
[[yy]]: {[[Type]]: "minute", [[Value]]: "06"}
})
Output (List of parts Records):
«
{[[Type]]: "literal", [[Value]]: "AA"},
{[[Type]]: "hour", [[Value]]: "15"},
{[[Type]]: "literal", [[Value]]: "BB"},
{[[Type]]: "minute", [[Value]]: "06"},
{[[Type]]: "literal", [[Value]]: "CC"}
»
14.5.2 CreatePartsFromList ( listFormat, list )
14.5.3 FormatList ( listFormat, list )
14.5.4 FormatListToParts ( listFormat, list )
14.5.5 StringListFromIterable ( iterable )
15 Locale Objects
15.1 The Intl.Locale Constructor
15.1.1 Intl.Locale ( tag [ , options ] )
Intl.Locale function is called with an argument tag and an optional argument options, the following steps are taken:15.1.2 UpdateLanguageId ( tag, options )
unicode_language_id unicode_language_subtag unicode_script_subtag unicode_region_subtag unicode_variant_subtag 15.1.3 MakeLocaleRecord ( tag, options, localeExtensionKeys )
15.2 Properties of the Intl.Locale Constructor
15.2.1 Intl.Locale.prototype
Intl.Locale.prototype is 15.2.2 Internal slots
15.3 Properties of the Intl.Locale Prototype Object
15.3.1 Intl.Locale.prototype.constructor
Intl.Locale.prototype.constructor is 15.3.2 get Intl.Locale.prototype.baseName
Intl.Locale.prototype.baseName is an 15.3.3 get Intl.Locale.prototype.calendar
Intl.Locale.prototype.calendar is an 15.3.4 get Intl.Locale.prototype.caseFirst
Intl.Locale.prototype.caseFirst is an 15.3.5 get Intl.Locale.prototype.collation
Intl.Locale.prototype.collation is an 15.3.6 get Intl.Locale.prototype.hourCycle
Intl.Locale.prototype.hourCycle is an 15.3.7 get Intl.Locale.prototype.language
Intl.Locale.prototype.language is an 15.3.8 Intl.Locale.prototype.maximize ( )
15.3.9 Intl.Locale.prototype.minimize ( )
15.3.10 get Intl.Locale.prototype.numberingSystem
Intl.Locale.prototype.numberingSystem is an 15.3.11 get Intl.Locale.prototype.numeric
Intl.Locale.prototype.numeric is an 15.3.12 get Intl.Locale.prototype.region
Intl.Locale.prototype.region is an 15.3.13 get Intl.Locale.prototype.script
Intl.Locale.prototype.script is an 15.3.14 Intl.Locale.prototype.toString ( )
15.3.15 get Intl.Locale.prototype.variants
Intl.Locale.prototype.variants is an 15.3.16 Intl.Locale.prototype [ %Symbol.toStringTag% ]
15.4 Properties of Intl.Locale Instances
15.5 Abstract Operations for Locale Objects
15.5.1 GetLocaleBaseName ( locale )
unicode_locale_id unicode_language_id 15.5.2 GetLocaleLanguage ( locale )
unicode_language_subtag 15.5.3 GetLocaleScript ( locale )
unicode_script_subtag unicode_script_subtag 15.5.4 GetLocaleRegion ( locale )
unicode_region_subtag unicode_language_subtag unicode_script_subtag unicode_region_subtag cannot be confused with any other valid unicode_region_subtag unicode_region_subtag 15.5.5 GetLocaleVariants ( locale )
unicode_script_subtag, unicode_region_subtag, or unicode_variant_subtag, but any unicode_variant_subtag is strictly longer than any prefix thereof which could also be matched by one of the other productions.unicode_variant_subtag 16 NumberFormat Objects
16.1 The Intl.NumberFormat Constructor
16.1.1 Intl.NumberFormat ( [ locales [ , options ] ] )
Intl.NumberFormat function is called with optional arguments locales and options, the following steps are taken:16.1.1.1 ChainNumberFormat ( numberFormat, newTarget, this )
16.1.2 SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault, notation )
16.1.3 SetNumberFormatUnitOptions ( intlObj, options )
16.2 Properties of the Intl.NumberFormat Constructor
16.2.1 Intl.NumberFormat.prototype
Intl.NumberFormat.prototype is 16.2.2 Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:16.2.3 Internal slots
16.3 Properties of the Intl.NumberFormat Prototype Object
16.3.1 Intl.NumberFormat.prototype.constructor
Intl.NumberFormat.prototype.constructor is 16.3.2 Intl.NumberFormat.prototype.resolvedOptions ( )
Internal Slot
Property
Conversion
[[Locale]]
[[NumberingSystem]]
[[Style]]
[[Currency]]
[[CurrencyDisplay]]
[[CurrencySign]]
[[Unit]]
[[UnitDisplay]]
[[MinimumIntegerDigits]]
[[MinimumFractionDigits]]
[[MaximumFractionDigits]]
[[MinimumSignificantDigits]]
[[MaximumSignificantDigits]]
[[UseGrouping]]
[[Notation]]
[[CompactDisplay]]
[[SignDisplay]]
[[RoundingIncrement]]
[[RoundingMode]]
[[ComputedRoundingPriority]]
[[TrailingZeroDisplay]]
16.3.3 get Intl.NumberFormat.prototype.format
Array.prototype.map or other functions.
This is considered a historical artefact, as part of a convention which is no longer followed for new features, but is preserved to maintain compatibility with existing programs.
16.3.4 Intl.NumberFormat.prototype.formatRange ( start, end )
formatRange method is called with arguments start and end, the following steps are taken:16.3.5 Intl.NumberFormat.prototype.formatRangeToParts ( start, end )
formatRangeToParts method is called with arguments start and end, the following steps are taken:16.3.6 Intl.NumberFormat.prototype.formatToParts ( value )
formatToParts method is called with an optional argument value, the following steps are taken:16.3.7 Intl.NumberFormat.prototype [ %Symbol.toStringTag% ]
16.4 Properties of Intl.NumberFormat Instances
Identifier
Description
Examples: Round to 0 fraction digits
-1.5
0.4
0.5
0.6
1.5
Toward positive infinity
⬆️ [-1]
⬆️ [1]
⬆️ [2]
Toward negative infinity
⬇️ [-2]
⬇️ [0]
⬇️ [1]
Away from zero
⬇️ [-2]
⬆️ [1]
⬆️ [2]
Toward zero
⬆️ [-1]
⬇️ [0]
⬇️ [1]
Ties toward positive infinity
⬆️ [-1]
⬇️ [0]
⬆️ [1]
⬆️ [2]
Ties toward negative infinity
⬇️ [-2]
⬇️ [0]
⬆️ [1]
⬇️ [1]
Ties away from zero
⬇️ [-2]
⬇️ [0]
⬆️ [1]
⬆️ [2]
Ties toward zero
⬆️ [-1]
⬇️ [0]
⬆️ [1]
⬇️ [1]
Ties toward an even rounding increment multiple
⬇️ [-2]
⬇️ [0]
⬆️ [1]
⬆️ [2]
16.5 Abstract Operations for NumberFormat Objects
16.5.1 CurrencyDigits ( currency )
16.5.2 Number Format Functions
16.5.3 FormatNumericToString ( intlObject, x )
16.5.4 PartitionNumberPattern ( numberFormat, x )
16.5.5 PartitionNotationSubPattern ( numberFormat, x, n, exponent )
Numbering System
Digits
adlm
U+1E950 to U+1E959
ahom
U+11730 to U+11739
arab
U+0660 to U+0669
arabext
U+06F0 to U+06F9
bali
U+1B50 to U+1B59
beng
U+09E6 to U+09EF
bhks
U+11C50 to U+11C59
brah
U+11066 to U+1106F
cakm
U+11136 to U+1113F
cham
U+AA50 to U+AA59
deva
U+0966 to U+096F
diak
U+11950 to U+11959
fullwide
U+FF10 to U+FF19
gara
U+10D40 to U+10D49
gong
U+11DA0 to U+11DA9
gonm
U+11D50 to U+11D59
gujr
U+0AE6 to U+0AEF
gukh
U+16130 to U+16139
guru
U+0A66 to U+0A6F
hanidec
U+3007, U+4E00, U+4E8C, U+4E09, U+56DB, U+4E94, U+516D, U+4E03, U+516B, U+4E5D
hmng
U+16B50 to U+16B59
hmnp
U+1E140 to U+1E149
java
U+A9D0 to U+A9D9
kali
U+A900 to U+A909
kawi
U+11F50 to U+11F59
khmr
U+17E0 to U+17E9
knda
U+0CE6 to U+0CEF
krai
U+16D70 to U+16D79
lana
U+1A80 to U+1A89
lanatham
U+1A90 to U+1A99
laoo
U+0ED0 to U+0ED9
latn
U+0030 to U+0039
lepc
U+1C40 to U+1C49
limb
U+1946 to U+194F
mathbold
U+1D7CE to U+1D7D7
mathdbl
U+1D7D8 to U+1D7E1
mathmono
U+1D7F6 to U+1D7FF
mathsanb
U+1D7EC to U+1D7F5
mathsans
U+1D7E2 to U+1D7EB
mlym
U+0D66 to U+0D6F
modi
U+11650 to U+11659
mong
U+1810 to U+1819
mroo
U+16A60 to U+16A69
mtei
U+ABF0 to U+ABF9
mymr
U+1040 to U+1049
mymrepka
U+116DA to U+116E3
mymrpao
U+116D0 to U+116D9
mymrshan
U+1090 to U+1099
mymrtlng
U+A9F0 to U+A9F9
nagm
U+1E4F0 to U+1E4F9
newa
U+11450 to U+11459
nkoo
U+07C0 to U+07C9
olck
U+1C50 to U+1C59
onao
U+1E5F1 to U+1E5FA
orya
U+0B66 to U+0B6F
osma
U+104A0 to U+104A9
outlined
U+1CCF0 to U+1CCF9
rohg
U+10D30 to U+10D39
saur
U+A8D0 to U+A8D9
segment
U+1FBF0 to U+1FBF9
shrd
U+111D0 to U+111D9
sind
U+112F0 to U+112F9
sinh
U+0DE6 to U+0DEF
sora
U+110F0 to U+110F9
sund
U+1BB0 to U+1BB9
sunu
U+11BF0 to U+11BF9
takr
U+116C0 to U+116C9
talu
U+19D0 to U+19D9
tamldec
U+0BE6 to U+0BEF
telu
U+0C66 to U+0C6F
thai
U+0E50 to U+0E59
tibt
U+0F20 to U+0F29
tirh
U+114D0 to U+114D9
tnsa
U+16AC0 to U+16AC9
vaii
U+A620 to U+A629
wara
U+118E0 to U+118E9
wcho
U+1E2F0 to U+1E2F9
16.5.6 FormatNumeric ( numberFormat, x )
16.5.7 FormatNumericToParts ( numberFormat, x )
16.5.8 ToRawPrecision ( x, minPrecision, maxPrecision, unsignedRoundingMode )
16.5.9 ToRawFixed ( x, minFraction, maxFraction, roundingIncrement, unsignedRoundingMode )
16.5.10 UnwrapNumberFormat ( nf )
16.5.11 GetNumberFormatPattern ( numberFormat, x )
16.5.12 GetNotationSubPattern ( numberFormat, exponent )
16.5.13 ComputeExponent ( numberFormat, x )
16.5.14 ComputeExponentForMagnitude ( numberFormat, magnitude )
16.5.15 Runtime Semantics: StringIntlMV
16.5.16 ToIntlMathematicalValue ( value )
16.5.17 GetUnsignedRoundingMode ( roundingMode, sign )
Identifier
Sign
Unsigned Rounding Mode
16.5.18 ApplyUnsignedRoundingMode ( x, r1, r2, unsignedRoundingMode )
16.5.19 PartitionNumberRangePattern ( numberFormat, x, y )
16.5.20 FormatApproximately ( numberFormat, result )
16.5.21 CollapseNumberRange ( numberFormat, result )
16.5.22 FormatNumericRange ( numberFormat, x, y )
16.5.23 FormatNumericRangeToParts ( numberFormat, x, y )
17 PluralRules Objects
17.1 The Intl.PluralRules Constructor
17.1.1 Intl.PluralRules ( [ locales [ , options ] ] )
Intl.PluralRules function is called with optional arguments locales and options, the following steps are taken:17.2 Properties of the Intl.PluralRules Constructor
17.2.1 Intl.PluralRules.prototype
Intl.PluralRules.prototype is 17.2.2 Intl.PluralRules.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:17.2.3 Internal slots
17.3 Properties of the Intl.PluralRules Prototype Object
17.3.1 Intl.PluralRules.prototype.constructor
Intl.PluralRules.prototype.constructor is 17.3.2 Intl.PluralRules.prototype.resolvedOptions ( )
Internal Slot
Property
Conversion
[[Locale]]
[[Type]]
[[Notation]]
[[CompactDisplay]]
[[MinimumIntegerDigits]]
[[MinimumFractionDigits]]
[[MaximumFractionDigits]]
[[MinimumSignificantDigits]]
[[MaximumSignificantDigits]]
[[RoundingIncrement]]
[[RoundingMode]]
[[ComputedRoundingPriority]]
[[TrailingZeroDisplay]]
17.3.3 Intl.PluralRules.prototype.select ( value )
select method is called with an argument value, the following steps are taken:17.3.4 Intl.PluralRules.prototype.selectRange ( start, end )
selectRange method is called with arguments start and end, the following steps are taken:17.3.5 Intl.PluralRules.prototype [ %Symbol.toStringTag% ]
17.4 Properties of Intl.PluralRules Instances
17.5 Abstract Operations for PluralRules Objects
17.5.1 PluralRuleSelect ( locale, type, notation, compactDisplay, s )
17.5.2 ResolvePlural ( pluralRules, n )
17.5.3 PluralRuleSelectRange ( locale, type, notation, compactDisplay, xp, yp )
17.5.4 ResolvePluralRange ( pluralRules, x, y )
18 RelativeTimeFormat Objects
18.1 The Intl.RelativeTimeFormat Constructor
18.1.1 Intl.RelativeTimeFormat ( [ locales [ , options ] ] )
Intl.RelativeTimeFormat function is called with optional arguments locales and options, the following steps are taken:18.2 Properties of the Intl.RelativeTimeFormat Constructor
18.2.1 Intl.RelativeTimeFormat.prototype
Intl.RelativeTimeFormat.prototype is 18.2.2 Intl.RelativeTimeFormat.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:18.2.3 Internal slots
18.3 Properties of the Intl.RelativeTimeFormat Prototype Object
18.3.1 Intl.RelativeTimeFormat.prototype.constructor
Intl.RelativeTimeFormat.prototype.constructor is 18.3.2 Intl.RelativeTimeFormat.prototype.resolvedOptions ( )
Internal Slot
Property
[[Locale]]
[[Style]]
[[Numeric]]
[[NumberingSystem]]
18.3.3 Intl.RelativeTimeFormat.prototype.format ( value, unit )
format method is called with arguments value and unit, the following steps are taken:18.3.4 Intl.RelativeTimeFormat.prototype.formatToParts ( value, unit )
formatToParts method is called with arguments value and unit, the following steps are taken:18.3.5 Intl.RelativeTimeFormat.prototype [ %Symbol.toStringTag% ]
18.4 Properties of Intl.RelativeTimeFormat Instances
18.5 Abstract Operations for RelativeTimeFormat Objects
18.5.1 SingularRelativeTimeUnit ( unit )
18.5.2 PartitionRelativeTimePattern ( relativeTimeFormat, value, unit )
18.5.3 MakePartsList ( pattern, unit, parts )
18.5.4 FormatRelativeTime ( relativeTimeFormat, value, unit )
18.5.5 FormatRelativeTimeToParts ( relativeTimeFormat, value, unit )
19 Segmenter Objects
19.1 The Intl.Segmenter Constructor
19.1.1 Intl.Segmenter ( [ locales [ , options ] ] )
Intl.Segmenter function is called with optional arguments locales and options, the following steps are taken:19.2 Properties of the Intl.Segmenter Constructor
19.2.1 Intl.Segmenter.prototype
Intl.Segmenter.prototype is 19.2.2 Intl.Segmenter.supportedLocalesOf ( locales [ , options ] )
supportedLocalesOf method is called with arguments locales and options, the following steps are taken:19.2.3 Internal slots
19.3 Properties of the Intl.Segmenter Prototype Object
19.3.1 Intl.Segmenter.prototype.constructor
Intl.Segmenter.prototype.constructor is 19.3.2 Intl.Segmenter.prototype.resolvedOptions ( )
Internal Slot
Property
[[Locale]]
[[SegmenterGranularity]]
19.3.3 Intl.Segmenter.prototype.segment ( string )
Intl.Segmenter.prototype.segment method is called on an Intl.Segmenter instance with argument string to create a 19.3.4 Intl.Segmenter.prototype [ %Symbol.toStringTag% ]
19.4 Properties of Intl.Segmenter Instances
19.5 Segments Objects
19.5.1 CreateSegmentsObject ( segmenter, string )
19.5.2 The %IntlSegmentsPrototype% Object
19.5.2.1 %IntlSegmentsPrototype%.containing ( index )
containing method is called on a 19.5.2.2 %IntlSegmentsPrototype% [ %Symbol.iterator% ] ( )
%Symbol.iterator% method is called on a 19.5.3 Properties of Segments Instances
19.6 Segment Iterator Objects
19.6.1 CreateSegmentIterator ( segmenter, string )
19.6.2 The %IntlSegmentIteratorPrototype% Object
19.6.2.1 %IntlSegmentIteratorPrototype%.next ( )
next method is called on a 19.6.2.2 %IntlSegmentIteratorPrototype% [ %Symbol.toStringTag% ]
19.6.3 Properties of Segment Iterator Instances
Internal Slot
Description
[[IteratingSegmenter]]
The Intl.Segmenter instance used for iteration.
[[IteratedString]]
The String value being iterated upon.
[[IteratedStringNextSegmentCodeUnitIndex]]
The code unit index in the String value being iterated upon at the start of the next segment.
19.7 Segment Data Objects
19.7.1 CreateSegmentDataObject ( segmenter, string, startIndex, endIndex )
19.8 Abstract Operations for Segmenter Objects
19.8.1 FindBoundary ( segmenter, string, startIndex, direction )
20 Locale Sensitive Functions of the ECMAScript Language Specification
20.1 Properties of the String Prototype Object
20.1.1 String.prototype.localeCompare ( that [ , locales [ , options ] ] )
localeCompare method is called with argument that and optional arguments locales, and options, the following steps are taken:localeCompare method itself is not directly suitable as an argument to Array.prototype.sort because the latter requires a function of two arguments.
localeCompare function is intentionally generic; it does not require that its 20.1.2 String.prototype.toLocaleLowerCase ( [ locales ] )
toLocaleLowerCase function is intentionally generic; it does not require that its 20.1.2.1 TransformCase ( S, locales, targetCase )
SpecialCasing.txt of the Unicode Character Database and/or CLDR and/or any other custom tailoring. Regardless of tailoring, a conforming implementation's case transformation algorithm must always yield the same result given the same input code points, locale, and target case.toLocaleUpperCase and toLocaleLowerCase have context-sensitive behaviour, the functions are not symmetrical. In other words, s.toLocaleUpperCase().toLocaleLowerCase() is not necessarily equal to s.toLocaleLowerCase() and s.toLocaleLowerCase().toLocaleUpperCase() is not necessarily equal to s.toLocaleUpperCase().
20.1.3 String.prototype.toLocaleUpperCase ( [ locales ] )
toLocaleUpperCase function is intentionally generic; it does not require that its 20.2 Properties of the Number Prototype Object
20.2.1 Number.prototype.toLocaleString ( [ locales [ , options ] ] )
toLocaleString method is called with optional arguments locales and options, the following steps are taken:20.3 Properties of the BigInt Prototype Object
20.3.1 BigInt.prototype.toLocaleString ( [ locales [ , options ] ] )
toLocaleString method is called with optional arguments locales and options, the following steps are taken:20.4 Properties of the Date Prototype Object
20.4.1 Date.prototype.toLocaleString ( [ locales [ , options ] ] )
toLocaleString method is called with optional arguments locales and options, the following steps are taken:20.4.2 Date.prototype.toLocaleDateString ( [ locales [ , options ] ] )
toLocaleDateString method is called with optional arguments locales and options, the following steps are taken:20.4.3 Date.prototype.toLocaleTimeString ( [ locales [ , options ] ] )
toLocaleTimeString method is called with optional arguments locales and options, the following steps are taken:20.5 Properties of the Array Prototype Object
20.5.1 Array.prototype.toLocaleString ( [ locales [ , options ] ] )
toLocaleString method is called with optional arguments locales and options, the following steps are taken:toLocaleString methods, and these Strings are then concatenated, separated by occurrences of an toLocaleString function is intentionally generic; it does not require that its Annex A (informative) Implementation Dependent Behaviour
Annex B (informative) Additions and Changes That Introduce Incompatibilities with Prior Editions
Annex C (informative) Colophon
Copyright & Software License
Copyright Notice
Software License