-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decide behavior with gaps in Intl.DateTimeFormat options (replacement pattern) #394
Comments
My concern about this approach is that it has a likelyhood of becoming a papercut giving developers an unexpected behavior. Finally, with the introduction of |
@zbraniecki I'm going to comment on this on the CLDR issue. |
We discussed this in CLDR-TC. Peter likes the approach (fill in missing fields) and suggested that we could do this in CLDR. Once CLDR supports it, then we could consider adding it as a spec requirement on the 402 level. |
CLDR ticket: https://unicode-org.atlassian.net/browse/CLDR-13627 |
Let's wait on the CLDR ticket, and then decide what further action to take here in 402. |
😯😯 |
Problem: A user builds an Intl.DateTimeFormat with non-contiguous options. For example:
What should the behavior be?
A problem with "garbage in, garbage out" is that you can get the CLDR replacement pattern exposed, as @anba pointed out in #346 (comment). Here is a list of current outputs in Chrome 78:
I have a slight preference for adopting behavior 3 (fill in the missing fields). This behavior would be fully spec-compliant as-is, since the patterns are implementation-defined, but we could further codify this behavior into the spec to provide clarity to users.
CLDR issue about minute + dayPeriod:
https://unicode-org.atlassian.net/browse/CLDR-13184
The text was updated successfully, but these errors were encountered: