Skip to content

Commit

Permalink
Fix precision 0 issue in TemporalDurationToString
Browse files Browse the repository at this point in the history
See #1859
  • Loading branch information
FrankYFTang committed Oct 7, 2021
1 parent 2959043 commit b433ba2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/duration.html
Expand Up @@ -1498,7 +1498,9 @@ <h1>TemporalDurationToString ( _years_, _months_, _weeks_, _days_, _hours_, _min
1. Let _decimalPart_ be _fraction_ formatted as a nine-digit decimal number, padded to the left with zeroes if necessary.
1. If _precision_ is *"auto"*, then
1. Set _decimalPart_ to the longest possible substring of _decimalPart_ starting at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO).
1. Else if _precision_ ≠ 0, then
1. Else if _precision_ = 0, then
1. Set _decimalPart_ to *""*.
1. Else,
1. Set _decimalPart_ to the substring of _decimalPart_ from 0 to _precision_.
1. Let _secondsPart_ be abs(_seconds_) formatted as a decimal number.
1. If _decimalPart_ is not *""*, then
Expand Down

0 comments on commit b433ba2

Please sign in to comment.