unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.33k stars 174 forks source link

Fractional second digit pattern handling is not exactly spec-compliant #4865

Open sffc opened 4 months ago

sffc commented 4 months ago

The spec says:

Finally: If the requested skeleton included both seconds and fractional seconds and the dateFormatItem skeleton included seconds but not fractional seconds, then the seconds field of the corresponding pattern should be adjusted by appending the locale’s decimal separator, followed by the sequence of ‘S’ characters from the requested skeleton.

In other words, fractional second digits should he handled in a pattern as: h:mm:ss.SSS

However, we currently handle them without the decimal separator: h:mm:ssSSS

Unclear how/if/when this should be fixed. It's only an issue when power users give us patterns directly.

sffc commented 1 month ago

I'm inclined to let this sit and fix it when a client asks us to fix it.