tc39 / proposal-intl-duration-format

https://tc39.es/proposal-intl-duration-format
MIT License
163 stars 18 forks source link

`"fractional"` and `"numeric"` style options for sub-second units #205

Closed kartva closed 2 months ago

kartva commented 2 months ago

Section 1.5 from the rendered TC39 proposal says that:

Intl.DurationFormat instances also have several internal slots that are computed by the constructor: ... [[MillisecondsStyle]] is one of the String values "long", "short", "narrow", or "fractional" identifying the formatting style used for the milliseconds field.

(emphasis mine)

while Table 3 says that:

Style Slot Display Slot Unit Values Digital Default
[[MillisecondsStyle]] [[MillisecondsDisplay]] "milliseconds" « "long", "short", "narrow", "numeric" » "numeric"

(emphasis mine)

This seems inconsistent and possibly incorrect.

sffc commented 2 months ago

The public API is "numeric" but in the spec it becomes "fractional" because it has distinct behavior.