Skip to content

LocaleNumberSkeleton

LocaleNumberSkeleton = object

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:15

Everything about a locale’s number rendering that Intl does not expose as data, recovered from what it does expose: labelled parts.

Intl.NumberFormat holds CLDR’s separators, grouping sizes and digit set internally and offers no accessor for them — resolvedOptions reports the options it was given, not the data it resolved. formatToParts does label every piece of its output, though, so formatting a probe value and reading the labels back recovers the lot without a CLDR table of our own.

This is only needed past Intl’s own limits of 100 fraction digits and 21 significant digits. Inside them Intl.NumberFormat.prototype.format is exact and is used directly.

readonly decimalSeparator: string

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:19

Character between the integral and fractional parts.


readonly digits: readonly string[]

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:17

The ten digits of the resolved numbering system, 0 through 9.


readonly groupSeparator: string

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:21

Character between digit groups, or "" when the locale groups none.


readonly groupSizes: readonly [number, number]

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:26

Digits in the group nearest the point, then in every group above it. [3, 3] for most locales, [3, 2] for en-IN’s 12,34,567.


readonly minimumGroupingDigits: number

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:31

Integral digits a value needs before grouping starts at all. 2 in pl-PL and es-ES, where 1000 is ungrouped but 10 000 is not.


readonly prefix: string

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:33

Text before the number, including any sign, currency symbol or spacing.


readonly suffix: string

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:35

Text after the number, including any percent sign, unit or spacing.