Commit 3b9e891
committed
Duration.toJSON() should not print unwanted zeroes
Due to a missing argument, Temporal.Duration.from({ hours: 1 }).toJSON()
would return "PT1H0.0S" instead of "PT1H". The same goes for
toLocaleString() in the absence of Intl.DurationFormat.
No change needed to the spec text or documentation, which are already
correct.1 parent 5be251f commit 3b9e891
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
330 | 336 | | |
331 | 337 | | |
332 | 338 | | |
| |||
0 commit comments