The abstract operation InitializeNumberFormat accepts the arguments numberFormat (which must be an object), locales, and options. It initializes numberFormat as a NumberFormat object. The following steps are taken:
Let requestedLocales be ? CanonicalizeLocaleList(locales).
Let compactDisplay be ? GetOption(options, "compactDisplay", "string", « "short", "long" », "short").
If notation is "compact", then
Set numberFormat.[[CompactDisplay]] to compactDisplay.
Let useGrouping be ? GetOption(options, "useGrouping", "boolean", undefined, true).
Set numberFormat.[[UseGrouping]] to useGrouping.
Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero" », "auto").
Set numberFormat.[[SignDisplay]] to signDisplay.
Return numberFormat.
1.1.3CurrencyDigits ( currency )
When the CurrencyDigits abstract operation is called with an argument currency (which must be an upper case String value), the following steps are taken:
If the ISO 4217 currency and funds code list contains currency as an alphabetic code, return the minor unit value corresponding to the currency from the list; otherwise, return 2.
1.1.4Number Format Functions
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:
Let nf be F.[[NumberFormat]].
Assert: Type(nf) is Object and nf has an [[InitializedNumberFormat]] internal slot.
The length property of a Number format function is 1.
1.1.5FormatNumericToString ( intlObject, x )
The FormatNumericToString abstract operation is called with arguments intlObject (which must be an object with [[RoundingType]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], and [[MaximumFractionDigits]] internal slots), and x (which must be a Number or BigInt value), and returns a Record containing two values: x as a String value with digits formatted according to the five formatting parameters in the field [[FormattedString]], and the final floating decimal value of x after rounding has been performed in the field [[RoundedNumber]].
If x < 0 or x is -0, let isNegative be true; else let isNegative be false.
If isNegative, then
Let x be -x.
If intlObject.[[RoundingType]] is significantDigits, then
Let result be ToRawPrecision(x, intlObject.[[MinimumSignificantDigits]], intlObject.[[MaximumSignificantDigits]]).
Else if intlObject.[[RoundingType]] is fractionDigits, then
Let result be ToRawFixed(x, intlObject.[[MinimumFractionDigits]], intlObject.[[MaximumFractionDigits]]).
Else,
Assert: intlObject.[[RoundingType]] is compactRounding.
Let minInteger be intlObject.[[MinimumIntegerDigits]].
If int < minInteger, then
Let forwardZeros be the String consisting of minInteger–int occurrences of the character "0".
Set string to the string-concatenation of forwardZeros and string.
If isNegative, then
Let x be -x.
Return the Record { [[RoundedNumber]]: x, [[FormattedString]]: string }.
1.1.6PartitionNumberPattern ( numberFormat, x )
The PartitionNumberPattern abstract operation is called with arguments numberFormat (which must be an object initialized as a NumberFormat) and x (which must be a Number or BigInt value), interprets x as a numeric value, and creates the corresponding parts according to the effective locale and the formatting options of numberFormat. The following steps are taken:
Let exponent be 0.
If x is NaN, then
Let n be an implementation- and locale-dependent (ILD) String value indicating the NaN value.
Else if x is not a finite Number or BigInt,
Let n be an ILD String value indicating infinity.
Else,
If numberFormat.[[Style]] is "percent", let x be 100 × x.
Append all elements of notationSubParts to result.
Else if p is equal to "plusSign", then
Let plusSignSymbol be the ILND String representing the plus sign.
Append a new Record { [[Type]]: "plusSign", [[Value]]: plusSignSymbol } as the last element of result.
Else if p is equal to "minusSign", then
Let minusSignSymbol be the ILND String representing the minus sign.
Append a new Record { [[Type]]: "minusSign", [[Value]]: minusSignSymbol } as the last element of result.
Else if p is equal to "percentSign" and numberFormat.[[Style]] is "percent", then
Let percentSignSymbol be the ILND String representing the percent sign.
Append a new Record { [[Type]]: "percentSign", [[Value]]: percentSignSymbol } as the last element of result.
Else if p is equal to "unitPrefix" and numberFormat.[[Style]] is "unit", then
Let unit be numberFormat.[[Unit]].
Let unitDisplay be numberFormat.[[UnitDisplay]].
Let mu be an ILD String value representing unit before x in unitDisplay form, which may depend on x in languages having different plural forms.
Append a new Record { [[Type]]: "unit", [[Value]]: mu } as the last element of result.
Else if p is equal to "unitSuffix" and numberFormat.[[Style]] is "unit", then
Let unit be numberFormat.[[Unit]].
Let unitDisplay be numberFormat.[[UnitDisplay]].
Let mu be an ILD String value representing unit after x in unitDisplay form, which may depend on x in languages having different plural forms.
Append a new Record { [[Type]]: "unit", [[Value]]: mu } as the last element of result.
Else if p is equal to "currencyCode" and numberFormat.[[Style]] is "currency", then
Let currency be numberFormat.[[Currency]].
Let cd be currency.
Append a new Record { [[Type]]: "currency", [[Value]]: cd } as the last element of result.
Else if p is equal to "currencyPrefix" and numberFormat.[[Style]] is "currency", then
Let currency be numberFormat.[[Currency]].
Let currencyDisplay be numberFormat.[[CurrencyDisplay]].
Let cd be an ILD String value representing currency before x in currencyDisplay form, which may depend on x in languages having different plural forms.
Append a new Record { [[Type]]: "currency", [[Value]]: cd } as the last element of result.
Else if p is equal to "currencySuffix" and numberFormat.[[Style]] is "currency", then
Let currency be numberFormat.[[Currency]].
Let currencyDisplay be numberFormat.[[CurrencyDisplay]].
Let cd be an ILD String value representing currency after x in currencyDisplay form, which may depend on x in languages having different plural forms. If the implementation does not have such a representation of currency, use currency itself.
Append a new Record { [[Type]]: "currency", [[Value]]: cd } as the last element of result.
Else,
Let unknown be an ILND String based on x and p.
Append a new Record { [[Type]]: "unknown", [[Value]]: unknown } as the last element of result.
Return result.
1.1.7PartitionNotationSubPattern ( numberFormat, x, n, exponent )
The PartitionNotationSubPattern abstract operation is called with arguments numberFormat (which must be an object initialized as a NumberFormat), x (which is a numeric value after rounding is applied), n (which is an intermediate formatted string), and exponent (an integer), and creates the corresponding parts for the number and notation according to the effective locale and the formatting options of numberFormat. The following steps are taken:
Let patternParts be PartitionPattern(notationSubPattern).
For each element patternPart of patternParts, in List order, do
Let p be patternPart.[[Type]].
If p is "literal", then
Add new part record { [[Type]]: "literal", [[Value]]: patternPart.[[Value]] } as a new element of result.
Else If p is equal to "number", then
If the numberFormat.[[NumberingSystem]] matches one of the values in the "Numbering System" column of Table 1 below, then
Let digits be a List whose 10 String valued elements are the UTF-16 string representations of the 10 digits specified in the "Digits" column of the matching row in Table 1.
Replace each digit in n with the value of digits[digit].
Else use an implementation dependent algorithm to map n to the appropriate representation of n in the given numbering system.
Let decimalSepIndex be Call(%StringProto_indexOf%, n, « ".", 0 »).
If decimalSepIndex > 0, then
Let integer be the substring of n from position 0, inclusive, to position decimalSepIndex, exclusive.
Let fraction be the substring of n from position decimalSepIndex, exclusive, to the end of n.
Else,
Let integer be n.
Let fraction be undefined.
If the numberFormat.[[UseGrouping]] is true, then
Let groupSepSymbol be the implementation-, locale-, and numbering system-dependent (ILND) String representing the grouping separator.
Let groups be a List whose elements are, in left to right order, the substrings defined by ILND set of locations within the integer.
Assert: The number of elements in groupsList is greater than 0.
Append a new Record { [[Type]]: "group", [[Value]]: groupSepSymbol } as the last element of result.
Else,
Append a new Record { [[Type]]: "integer", [[Value]]: integer } as the last element of result.
If fraction is not undefined, then
Let decimalSepSymbol be the ILND String representing the decimal separator.
Append a new Record { [[Type]]: "decimal", [[Value]]: decimalSepSymbol } as the last element of result.
Append a new Record { [[Type]]: "fraction", [[Value]]: fraction } as the last element of result.
Else if p is equal to "compactSymbol", then
Let compactSymbol be an ILD string representing exponent in short form, which may depend on x in languages having different plural forms. The implementation must be able to provide this string, or else the pattern would not have a "{compactSymbol}" placeholder.
Append a new Record { [[Type]]: "compact", [[Value]]: compactSymbol } as the last element of result.
Else if p is equal to "compactName", then
Let compactName be an ILD string representing exponent in long form, which may depend on x in languages having different plural forms. The implementation must be able to provide this string, or else the pattern would not have a "{compactName}" placeholder.
Append a new Record { [[Type]]: "compact", [[Value]]: compactName } as the last element of result.
Else if p is equal to "scientificSeparator", then
Let scientificSeparator be the ILND String representing the exponent separator.
Append a new Record { [[Type]]: "exponentSeparator", [[Value]]: scientificSeparator } as the last element of result.
Else if p is equal to "scientificExponent", then
If exponent < 0, then
Let minusSignSymbol be the ILND String representing the minus sign.
Append a new Record { [[Type]]: "exponentMinusSign", [[Value]]: minusSignSymbol } as the last element of result.
Let exponent be -exponent.
Let exponentResult be ToRawFixed(exponent, 1, 0, 0).
Append a new Record { [[Type]]: "exponentInteger", [[Value]]: exponentResult.[[FormattedString]] } as the last element of result.
Else,
Let unknown be an ILND String based on x and p.
Append a new Record { [[Type]]: "unknown", [[Value]]: unknown } as the last element of result.
Return result.
Table 1: Numbering systems with simple digit mappings
The computations rely on String values and locations within numeric strings that are dependent upon the implementation and the effective locale of numberFormat ("ILD") or upon the implementation, the effective locale, and the numbering system of numberFormat ("ILND"). The ILD and ILND Strings mentioned, other than those for currency names, must not contain any characters in the General Category "Number, decimal digit" as specified by the Unicode Standard.
Note 2
It is recommended that implementations use the locale provided by the Common Locale Data Repository (available at http://cldr.unicode.org).
1.1.8FormatNumeric( numberFormat, x )
The FormatNumeric abstract operation is called with arguments numberFormat (which must be an object initialized as a NumberFormat) and x (which must be a Number or BigInt value), and performs the following steps:
Set result to the string-concatenation of result and part.[[Value]].
Return result.
1.1.9FormatNumericToParts( numberFormat, x )
The FormatNumericToParts abstract operation is called with arguments numberFormat (which must be an object initialized as a NumberFormat) and x (which must be a Number or BigInt value), and performs the following steps:
When the ToRawPrecision abstract operation is called with arguments x (which must be a finite non-negative Number or BigInt), minPrecision, and maxPrecision (both must be integers between 1 and 21), the following steps are taken:
Let p be maxPrecision.
If x = 0, then
Let m be the String consisting of p occurrences of the character "0".
Let e be 0.
Let xFinal be 0.
Else,
Let e be the base 10 logarithm of x rounded down to the nearest integer.
Let n be an integer such that 10p–1 ≤ n < 10p and for which the exact mathematical value of n × 10e–p+1 – x is as close to zero as possible. If there is more than one such n, pick the one for which n × 10e–p+1 is larger.
Let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
Let xFinal be n × 10e–p+1.
If e ≥ p–1, then
Let m be the string-concatenation of m and e–p+1 occurrences of the character "0".
Let int be e+1.
Else if e ≥ 0, then
Let m be the string-concatenation of the first e+1 characters of m, the character ".", and the remaining p–(e+1) characters of m.
Let int be e+1.
Else,
Assert: e < 0.
Let m be the string-concatenation of the String value "0.", –(e+1) occurrences of the character "0", and m.
Let int be 1.
If m contains the character ".", and maxPrecision > minPrecision, then
Let cut be maxPrecision – minPrecision.
Repeat, while cut > 0 and the last character of m is "0"
Remove the last character from m.
Decrease cut by 1.
If the last character of m is ".", then
Remove the last character from m.
Return the Record { [[FormattedString]]: m, [[RoundedNumber]]: xFinal, [[IntegerDigitsCount]]: int }.
When the ToRawFixed abstract operation is called with arguments x (which must be a finite non-negative Number or BigInt), minInteger (which must be an integer between 1 and 21), minFraction, and maxFraction (which must be integers between 0 and 20), the following steps are taken:
Let f be maxFraction.
Let n be an integer for which the exact mathematical value of n ÷ 10f – x is as close to zero as possible. If there are two such n, pick the larger n.
Let xFinal be n ÷ 10f.
If n = 0, let m be the String "0". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
If f ≠ 0, then
Let k be the number of characters in m.
If k ≤ f, then
Let z be the String value consisting of f+1–k occurrences of the character "0".
Let m be the string-concatenation of z and m.
Let k be f+1.
Let a be the first k–f characters of m, and let b be the remaining f characters of m.
Let m be the string-concatenation of a, ".", and b.
Let int be the number of characters in a.
Else, let int be the number of characters in m.
Let cut be maxFraction – minFraction.
Repeat, while cut > 0 and the last character of m is "0"
Remove the last character from m.
Decrease cut by 1.
If the last character of m is ".", then
Remove the last character from m.
Return the Record { [[FormattedString]]: m, [[RoundedNumber]]: xFinal, [[IntegerDigitsCount]]: int }.
1.1.12UnwrapNumberFormat( nf )
The UnwrapNumberFormat abstract operation gets the underlying NumberFormat operation
for various methods which implement ECMA-402 v1 semantics for supporting initializing
existing Intl objects.
Let style be ? GetOption(options, "style", "string", « "decimal", "percent", "currency", "unit" », "decimal").
Set intlObj.[[Style]] to style.
Let currency be ? GetOption(options, "currency", "string", undefined, undefined).
If currency is not undefined, then
If the result of IsWellFormedCurrencyCode(currency) is false, throw a RangeError exception.
Let currencyDisplay be ? GetOption(options, "currencyDisplay", "string", « "code", "symbol", "narrowSymbol", "name" », "symbol").
Let currencySign be ? GetOption(options, "currencySign", "string", « "standard", "accounting" », "standard").
Let unit be ? GetOption(options, "unit", "string", undefined, undefined).
If unit is not undefined, then
If the result of IsWellFormedUnitIdentifier(unit) is false, throw a RangeError exception.
Let unitDisplay be ? GetOption(options, "unitDisplay", "string", « "short", "narrow", "long" », "short").
If style is "currency", then
If currency is undefined, throw a TypeError exception.
Let currency be the result of converting currency to upper case as specified in .
Set intlObj.[[Currency]] to currency.
Set intlObj.[[CurrencyDisplay]] to currencyDisplay.
Set intlObj.[[CurrencySign]] to currencySign.
If style is "unit", then
If unit is undefined, throw a TypeError exception.
Set intlObj.[[Unit]] to unit.
Set intlObj.[[UnitDisplay]] to unitDisplay.
1.1.14GetNumberFormatPattern ( numberFormat, x )
The abstract operation GetNumberFormatPattern considers the resolved unit-related options in the number format object along with the final scaled and rounded number being formatted and returns a pattern, a String value as described in 1.3.3.
The abstract operation GetNotationSubPattern considers the resolved notation and exponent, and returns a String value for the notation sub pattern as described in 1.3.3.
Let dataLocaleData be localeData.[[<dataLocale>]].
Let notationSubPatterns be dataLocaleData.[[notationSubPatterns]].
Assert: notationSubPatterns is a Record (see 1.3.3).
Let notation be numberFormat.[[Notation]].
If notation is "scientific" or notation is "engineering", then
Return notationSubPatterns.[[scientific]].
Else if exponent is not 0, then
Assert: notation is "compact".
Let compactDisplay be numberFormat.[[CompactDisplay]].
Let compactPatterns be notationSubPatterns.[[compact]].[[>compactDisplay<]].
Return compactPatterns.[[exponent]].
Else,
Return "{number}".
1.1.16ComputeExponent ( numberFormat, x )
The abstract operation ComputeExponent computes an exponent (power of ten) by which to scale x according to the number formatting settings. It handles cases such as 999 rounding up to 1000, requiring a different exponent.
If x = 0, then
Return 0.
If x < 0, then
Let x = -x.
Let magnitude be the base 10 logarithm of x rounded down to the nearest integer.
The abstract operation ComputeExponentHelper computes an exponent by which to scale a number of the given magnitude (power of ten of the most significant digit) according to the locale and the desired notation (scientific, engineering, or compact).
Let notation be numberFormat.[[Notation]].
If notation is "standard", then
Return 0.
Else if notation is "scientific", then
Return magnitude.
Else if notation is "engineering", then
Let thousands be the greatest integer that is not greater than magnitude ÷ 3.
Return thousands × 3.
Else,
Assert: notation is "compact".
Let exponent be an implementation- and locale-dependent (ILD) integer by which to scale a number of the given magnitude in compact notation for the current locale.
Return exponent.
1.2The Intl.NumberFormat Constructor
The NumberFormat constructor is the %NumberFormat% intrinsic object and a standard built-in property of the Intl object. Behaviour common to all service constructor properties of the Intl object is specified in .
The value of the length property of the supportedLocalesOf method is 1.
1.3.3Internal slots
The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in .
The value of the [[RelevantExtensionKeys]] internal slot is « "nu" ».
Note 1
Unicode Technical Standard 35 describes two locale extension keys that are relevant to number formatting, "nu" for numbering system and "cu" for currency. Intl.NumberFormat, however, requires that the currency of a currency format is specified through the currency property in the options objects.
The value of the [[LocaleData]] internal slot is implementation defined within the constraints described in and the following additional constraints:
The list that is the value of the "nu" field of any locale field of [[LocaleData]] must not include the values "native", "traditio", or "finance".
[[LocaleData]].[[<locale>]] must have a [[patterns]] field for all locale values locale. The value of this field must be a Record, which must have fields with the names of the four number format styles: "decimal", "percent", "currency", and "unit".
The two fields "currency" and "unit" noted above must be Records with at least one field, "fallback". The "currency" may have additional fields with keys corresponding to currency codes according to . Each field of "currency" must be a Record with fields corresponding to the possible currencyDisplay values: "code", "symbol", "narrowSymbol", and "name". Each of those fields must contain a Record with fields corresponding to the possible currencySign values: "standard" or "accounting". The "unit" field (of [[LocaleData]].[[<locale>]]) may have additional fields beyond the required field "fallback" with keys corresponding to core measurement unit identifiers corresponding to . Each field of "unit" must be a Record with fields corresponding to the possible unitDisplay values: "narrow", "short", and "long".
All of the leaf fields so far described for the patterns tree ("decimal", "percent", great-grandchildren of "currency", and grandchildren of "unit") must be Records with the keys "positivePattern", "zeroPattern", and "negativePattern".
The value of the aforementioned fields (the sign-dependent pattern fields) must be string values that must contain the substring "{number}". "positivePattern" must contain the substring "{plusSign}" but not "{minusSign}"; "negativePattern" must contain the substring "{minusSign}" but not "{plusSign}"; and "zeroPattern" must not contain either "{plusSign}" or "{minusSign}". Additionally, the values within the "percent" field must also contain the substring "{percentSign}"; the values within the "currency" field must also contain one or more of the following substrings: "{currencyCode}", "{currencyPrefix}", or "{currencySuffix}"; and the values within the "unit" field must also contain one or more of the following substrings: "{unitPrefix}" or "{unitSuffix}". The pattern strings must not contain any characters in the General Category "Number, decimal digit" as specified by the Unicode Standard.
[[LocaleData]].[[<locale>]] must also have a [[notationSubPatterns]] field for all locale values locale. The value of this field must be a Record, which must have two fields: [[scientific]] and [[compact]]. The [[scientific]] field must be a string value containing the substrings "{number}", "{scientificSeparator}", and "{scientificExponent}". The [[compact]] field must be a Record with two fields: "short" and "long". Each of these fields must be a Record with integer keys corresponding to all discrete magnitudes the implementation supports for compact notation. Each of these fields must be a string value which may contain the substring "{number}". Strings descended from "short" must contain the substring "{compactSymbol}", and strings descended from "long" must contain the substring "{compactName}".
Note 2
It is recommended that implementations use the locale data provided by the Common Locale Data Repository (available at http://cldr.unicode.org).
1.4Properties of the Intl.NumberFormat Prototype Object
The Intl.NumberFormat prototype object is itself an ordinary object. %NumberFormatPrototype% is not an Intl.NumberFormat instance and does not have an [[InitializedNumberFormat]] internal slot or any of the other internal slots of Intl.NumberFormat instance objects.
1.4.1Intl.NumberFormat.prototype.constructor
The initial value of Intl.NumberFormat.prototype.constructor is the intrinsic object %NumberFormat%.
The initial value of the @@toStringTag property is the String value "Object".
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
1.4.3get Intl.NumberFormat.prototype.format
Intl.NumberFormat.prototype.format is an accessor property whose set accessor function is undefined. Its get accessor function performs the following steps:
Let nf be the this value.
If Type(nf) is not Object, throw a TypeError exception.
Let F be a new built-in function object as defined in Number Format Functions (1.1.4).
Set F.[[NumberFormat]] to nf.
Set nf.[[BoundFormat]] to F.
Return nf.[[BoundFormat]].
Note
The returned function is bound to nf so that it can be passed directly to 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.
1.4.4Intl.NumberFormat.prototype.formatToParts ( value )
When the formatToParts method is called with an optional argument value, the following steps are taken:
Table 2: Resolved Options of NumberFormat Instances
Internal Slot
Property
[[Locale]]
"locale"
[[NumberingSystem]]
"numberingSystem"
[[Style]]
"style"
[[Currency]]
"currency"
[[CurrencyDisplay]]
"currencyDisplay"
[[CurrencySign]]
"currencySign"
[[Unit]]
"unit"
[[UnitDisplay]]
"unitDisplay"
[[MinimumIntegerDigits]]
"minimumIntegerDigits"
[[MinimumFractionDigits]]
"minimumFractionDigits"
[[MaximumFractionDigits]]
"maximumFractionDigits"
[[MinimumSignificantDigits]]
"minimumSignificantDigits"
[[MaximumSignificantDigits]]
"maximumSignificantDigits"
[[UseGrouping]]
"useGrouping"
[[Notation]]
"notation"
[[CompactDisplay]]
"compactDisplay"
[[SignDisplay]]
"signDisplay"
1.5Properties of Intl.NumberFormat Instances
Intl.NumberFormat instances are ordinary objects that inherit properties from %NumberFormatPrototype%.
Intl.NumberFormat instances have an [[InitializedNumberFormat]] internal slot.
Intl.NumberFormat instances also have several internal slots that are computed by the constructor:
[[Locale]] is a String value with the language tag of the locale whose localization is used for formatting.
[[DataLocale]] is a String value with the language tag of the nearest locale for which the implementation has data to perform the formatting operation. It will be a parent locale of [[Locale]].
[[NumberingSystem]] is a String value with the "type" given in Unicode Technical Standard 35 for the numbering system used for formatting.
[[Style]] is one of the String values "decimal", "currency", "percent", or "unit", identifying the type of quantity being measured.
[[Currency]] is a String value with the currency code identifying the currency to be used if formatting with the "currency" unit type. It is only used when [[Style]] has the value "currency".
[[CurrencyDisplay]] is one of the String values "code", "symbol", "narrowSymbol", or "name", specifying whether to display the currency as an ISO 4217 alphabetic currency code, a localized currency symbol, or a localized currency name if formatting with the "currency" style. It is only used when [[Style]] has the value "currency".
[[CurrencySign]] is one of the String values "standard" or "accounting", specifying whether to render negative numbers in accounting format, often signified by parenthesis. It is only used when [[Style]] has the value "currency" and when [[SignDisplay]] is not "never".
[[Unit]] is a core unit identifier, as defined by Unicode Technical Standard #35, Part 2, Section 6. It is only used when [[Style]] has the value "unit".
[[UnitDisplay]] is one of the String values "short", "narrow", or "long", specifying whether to display the unit as a symbol, narrow symbol, or localized long name if formatting with the "unit" style. It is only used when [[Style]] has the value "unit".
[[MinimumIntegerDigits]] is a non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary.
[[MinimumFractionDigits]] and [[MaximumFractionDigits]] are non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary. These properties are only used when [[RoundingType]] is fractionDigits.
[[MinimumSignificantDigits]] and [[MaximumSignificantDigits]] are positive integer Number values indicating the minimum and maximum fraction digits to be shown. If present, the formatter uses however many fraction digits are required to display the specified number of significant digits. These properties are only used when [[RoundingType]] is significantDigits.
[[UseGrouping]] is a Boolean value indicating whether a grouping separator should be used.
[[RoundingType]] is one of the String values fractionDigits, significantDigits, or compactRounding, indicating which rounding strategy to use. If fractionDigits, the number is rounded according to [[MinimumFractionDigits]] and [[MaximumFractionDigits]], as described above. If significantDigits, the number is rounded according to [[MinimumSignificantDigits]] and [[MaximumSignificantDigits]] as described above. If compactRounding, the number is rounded to 1 maximum fraction digit if there is 1 digit before the decimal separator, and otherwise round to 0 fraction digits.
[[Notation]] is one of the String values "standard", "scientific", "engineering", or "compact", specifying whether the number should be displayed without scaling, scaled to the units place with the power of ten in scientific notation, scaled to the nearest thousand with the power of ten in scientific notation, or scaled to the nearest locale-dependent compact decimal notation power of ten with the corresponding compact decimal notation affix.
[[CompactDisplay]] is one of the String values "short" or "long", specifying whether to display compact notation affixes in short form ("5K") or long form ("5 thousand") if formatting with the "compact" notation. It is only used when [[Notation]] has the value "compact".
[[SignDisplay]] is one of the String values "auto", "always", "never", or "exceptZero", specifying whether to show the sign on negative numbers only, positive and negative numbers including zero, neither positive nor negative numbers, or positive and negative numbers but not zero. In scientific notation, this slot affects the sign display of the mantissa but not the exponent.
Finally, Intl.NumberFormat instances have a [[BoundFormat]] internal slot that caches the function returned by the format accessor (1.4.3).