-
Notifications
You must be signed in to change notification settings - Fork 158
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
CreateTemporalZonedDateTime: Wrong argument type for "timeZone" #3055
Comments
This seems correct as-is to me:
Feel free to reopen if I overlooked something. |
Reopening. How does "available time zone identifier" differ from the existing term "time zone identifier" defined in current ECMA-262's time zone identifiers section? Based on my intent when I wrote that ECMA-262 text, it seeems like "available time zone identifier" is redundant and could be removed. But perhaps my 262 text was unclear, or you had something else in mind? OTOH, there may (or may not) be a need for a new term for a time zone identifier in its normalized form, i.e. the result of ToTemporalTimeZoneIdentifier. BTW, here's my mental map of the terms defined in ECMA-262, using bullet nesting to imply "IS A" relationships:
|
I've incorrectly treated available named time zones and available time zone identifier as the same type.
Is this covered by normalized format of a time zone identifier (defined in https://tc39.es/proposal-temporal/#sec-time-zone-identifiers)? Temporal adds available time zone identifier as another subtype, so the relationships are now:
And for the actual time zones:
|
I don't understand (yet!) what is the delta between available time zone identifier and time zone identifier. @ptomato could you clarify? |
Here is the difference as far as I understand it from https://tc39.es/proposal-temporal/#sec-time-zone-identifiers:
So all available time zone identifiers are time zone identifiers, but not vice versa. Examples of time zone identifiers that are not available time zone identifiers are:
|
Do we really need this category, of strings that are syntactically valid but are not valid named or offset IDs? Why is that needed? |
I did a census of the places where it's used:
Of these, I think (3), (4), and (6) are probably mistakes and should be available time zone identifier. The others seem correct and necessary to me, so I'm not sure we can get rid of it entirely. |
In a few places, we used "time zone identifier" (any string consisting of allowed code units) where "available time zone identifier" would be correct. Use that instead. See: #3055
In a few places, we used "time zone identifier" (any string consisting of allowed code units) where "available time zone identifier" would be correct. Use that instead. See: #3055
In a few places, we used "time zone identifier" (any string consisting of allowed code units) where "available time zone identifier" would be correct. Use that instead. See: #3055
In a few places, we used "time zone identifier" (any string consisting of allowed code units) where "available time zone identifier" would be correct. Use that instead. See: #3055
I fixed the cases that I believe are mistakes. The remaining uses of time zone identifier are used to denote parse results before validation, or in case (5) above to talk about which strings are or aren't in the TZDB. So I think this is OK to close now. |
CreateTemporalZonedDateTime:
But
timeZone
can also be an offset time zone, so it's type should instead be "time zone identifiers".The text was updated successfully, but these errors were encountered: