Skip to content

Commit dfef9e0

Browse files
committed
Accepted for Stage 1, add presentation link, update README examples
1 parent 024750d commit dfef9e0

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
Champion: Eemeli Aro
66

7-
Stage: 0
7+
Stage: 1
8+
9+
Presentations:
10+
- [For Stage 1](https://docs.google.com/presentation/d/1gunNRRXJNdDwqTHh-XjV3ueI8PFasRI9WcF4KfWvxE0/edit?usp=sharing) (2025.05)
811

912
## Motivation
1013

@@ -43,7 +46,16 @@ If accepted, this proposal would change the internals of these interfaces
4346
such that trailing zeros would be retained,
4447
and included in the formatted or selected value.
4548
The treatment of Number or BigInt values would not change,
46-
and options such as `maximumFractionDigits` would still work as before.
49+
and options such as `maximumFractionDigits` would still work as before:
50+
51+
```js
52+
const nf = new Intl.NumberFormat('en', { minimumFractionDigits: 1 });
53+
54+
nf.format('1') === '1.0'
55+
nf.format('1.00') === '1.00'
56+
nf.format('1.0000') === '1.000'
57+
// maximumFractionDigits default is 3.
58+
```
4759

4860
## Background
4961

@@ -61,6 +73,7 @@ The maximum limit for the fraction precision was increased in 2023 from 20 to 10
6173
A numerical string representation of a Number with trailing zeros is available as `Number.prototype.toPrecision`:
6274
```js
6375
(42).toPrecision(4) === "42.00"
76+
(4200).toPrecision(2) === "4.2e+3"
6477
```
6578

6679
<!--

0 commit comments

Comments
 (0)