Keep trailing zeros in Intl.NumberFormat and Intl.PluralRules S3
- Stage: Stage 3
- Status: Active
- ECMAScript edition: —
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal addresses the loss of trailing zeros when numeric strings are formatted by Intl.NumberFormat or used in Intl.PluralRules.select, which currently discards them. It proposes to retain these trailing zeros in the internal mathematical value, so that formatting '1.0' yields '1.0' and plural selection treats it as 'other'.
The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.
Keep trailing zeros in Intl.NumberFormat and Intl.PluralRules
Status
Stage: 3
Champion: Eemeli Aro
Reviewers: Richard Gibson (#7) and Shane Carr (#8)
Presentations:
- For Stage 1 (2025.05)
- For Stage 2/2.7 (2025.07)
- Stage 2.7 Update (2025.11)
- For Stage 3 (2026.03)
- For Stage 3 (2026.05)
Polyfill: eemeli/formatjs-for-keep-trailing-zeros
Motivation
Trailing zeros are important when formatting numbers or selecting their plural categories, and should be retained when included in a numeric string input value.
Use cases
Currently, trailing zeros are discarded:
Instead, they should be retained:
Description
Currently, Intl.NumberFormat and Intl.PluralRules accept numeric strings as input, converting such internally to an Intl Mathematical Value with arbitrary decimal precision.
If accepted, this proposal would change the internals of these interfaces
such that trailing zeros would be retained,
and included in the formatted or selected value.
The treatment of Number or BigInt values would not change,
and options such as maximumFractionDigits would still work as before:
Background
The treatment of numeric string values was previously changed in 2023 as a part of the Intl.NumberFormat V3 proposal, before which they were parsed into lower-precision Number values.
The Decimal proposal is looking to introduce
a numeric type capable of representing values with up to 34 decimal places of precision,
along with a separate representation of the value's precision via Decimal.Amount or some other representation.
Currently, the effective limits for the precision of Intl.NumberFormat and Intl.PluralRules
are around 300 decimal places for the integer part, and 100 places for the fraction part.
The maximum limit for the fraction precision was increased in 2023 from 20 to 100 in ECMA-402 PR #786.
A numerical string representation of a Number with trailing zeros is available as Number.prototype.toPrecision: