@@ -686,16 +686,16 @@ <h1>FormatSecondsStringPart ( _second_, _millisecond_, _microsecond_, _nanosecon
686686 1. Assert: _second_ , _millisecond_ , _microsecond_ , and _nanosecond_ are integers.
687687 1. If _precision_ is *"minute"* , return *""* .
688688 1. Let _secondsString_ be the string-concatenation of the code unit 0x003A (COLON) and ToZeroPaddedDecimalString(_second_ , 2).
689- 1. Let _fraction_ be _millisecond_ × ; 10<sup >6</sup > + _microsecond_ × ; 10<sup >3</sup > + _nanosecond_ .
689+ 1. Let _subSecondNanoseconds_ be _millisecond_ × ; 10<sup >6</sup > + _microsecond_ × ; 10<sup >3</sup > + _nanosecond_ .
690690 1. If _precision_ is *"auto"* , then
691- 1. If _fraction_ is 0, return _secondsString_ .
692- 1. Set _fraction_ to ToZeroPaddedDecimalString(_fraction_ , 9).
693- 1. Set _fraction_ to the longest possible substring of _fraction_ starting at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO).
691+ 1. If _subSecondNanoseconds_ is 0, return _secondsString_ .
692+ 1. Let _fractionString_ be ToZeroPaddedDecimalString(_subSecondNanoseconds_ , 9).
693+ 1. Set _fractionString_ to the longest prefix of _fractionString_ ending with a code unit other than 0x0030 (DIGIT ZERO).
694694 1. Else,
695695 1. If _precision_ is 0, return _secondsString_ .
696- 1. Set _fraction_ to ToZeroPaddedDecimalString(_fraction_ , 9).
697- 1. Set _fraction_ to the substring of _fraction_ from 0 to _precision_ .
698- 1. Return the string-concatenation of _secondsString_ , the code unit 0x002E (FULL STOP), and _fraction_ .
696+ 1. Let _fractionString_ be ToZeroPaddedDecimalString(_subSecondNanoseconds_ , 9).
697+ 1. Set _fractionString_ to the substring of _fractionString_ from 0 to _precision_ .
698+ 1. Return the string-concatenation of _secondsString_ , the code unit 0x002E (FULL STOP), and _fractionString_ .
699699 </emu-alg >
700700 </emu-clause >
701701
0 commit comments