You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.4.3 Intl.DurationFormat.prototype.format ( duration )
...
3. Let record be ? ToPartialDuration(duration).
4. Let formatted be ? PartitionDurationFormatPattern(df, record).
1.4.4 Intl.DurationFormat.prototype.formatToParts ( duration )
...
3. Let record be ? ToPartialDuration(duration).
4. Let formatted be ? PartitionDurationFormatPattern(df, record).
In the proposal, there are two places calling PartitionDurationFormatPattern with the value return by ToPartialDuration.
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.format
and
https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.formatToParts
Notice, in ToPartialDuration
https://tc39.es/proposal-temporal/#sec-temporal-topartialduration
some of the field might be "undefined"
But inside 1.1.2 PartitionDurationFormatPattern ( durationFormat, duration )
https://tc39.es/proposal-intl-duration-format/#sec-partitiondurationformatpattern
step 2-k-i
but either duration.[[Microseconds]] and duration.[[Nanoseconds]] could be undefined.
and step 2-k-ii-1
duration.[[Milliseconds]] could be undefined
and step 2-k-ii-2-a
duration.[[Seconds]] could be undefined
and step 2-l-i
any duration.[[]] could be undefined and resulting value is undefined
but then 2-p
will pass undefined as 2nd argument to FormatNumeric
and step 2-t-ii
will pass undefined as 2nd argument to ResolvePlural
I don't think any of above are correct.
@sffc @ryzokuken
The text was updated successfully, but these errors were encountered: