-
Notifications
You must be signed in to change notification settings - Fork 2
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
Should null
be accepted in place of the string ID for this locale?
#5
Comments
Could you explain how accepting |
Whoops, that was a copy/paste error from another draft issue. I just edited the OP to clarify what I intended, which was about locale IDs not calendar IDs. Thanks for pointing out my mistake! |
Thank you for the correction, now I understand your concern a bit better. :) I'm starting to think that the answer to your titular question should be "yes", but with a canonicalizzation from Users with code as you describe could also explicitly use |
From #2 (comment):
This seems reasonable, although doing it would mean that code checking the thruthyness of a locale ID would treat the
null
calendar identically to an un-provided (undefined
) calendar option. I suspect this would subtly change behavior of existing code like this:For this reason, we'd need to be careful about the tradeoff between the convenience and intuitiveness of using
null
with the consequence of potentially breaking code like what's above. I don't yet have an opinion about whether this is a deal-breaker or not for usingnull
.A related question: is
null
is accepted, then should it be the only value accepted? Or should it also accept a string ID? (Which I suggest in #3 should probably not be existing values likeund
orzxx
.)null
is accepted, then it'd forclose accepting subtags, which may or may not be a problem depending on how Should subtags be accepted? #4 is resolved.new Intl.DateTimeFormat().resolvedOptions().locale
returnnull
or the string ID?(edited to fix code sample and my mistakes above)
The text was updated successfully, but these errors were encountered: