-
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
Editorial: Distinguish 'available time zone identifier' #953
base: main
Are you sure you want to change the base?
Conversation
Temporal will introduce separate definitions for 'time zone identifier' (string consisting of characters that are legal in time zone identifiers) and 'available time zone identifier' (time zone identifier that is known to the implementation.) For some usages it's probably more appropriate to speak of available time zone identifiers than time zone identifiers. For others, it's probably more appropriate to use 'available named time zone identifier' which is a definition given in ECMA-262.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes, thanks.
Dumb question: if "time zone identifier" is just a string that satisfies a particular syntax, then why not just use the syntax-directed operation (not sure if I'm using that term correctly) instead of a custom-defined term? This would make it obvious to readers that you're just talking about a string with valid syntax, rather than any actual meaningful identifier.
Will this show up as a definition link like "mathematical value" for example? |
It will eventually. We'd need to add the definition "An available time zone identifier is either an available named time zone identifier or an offset time zone identifier." to https://tc39.es/ecma262/#sec-time-zone-identifiers. This addition is part of Temporal, but we could upstream that sentence into ECMA-262 earlier if need be.
You can't tell just from the syntax whether a time zone identifier is available or not, you need the TZDB. We could write a syntax-directed operation that says to consult the TZDB, but I suspect implementations would object to that because it'd complicate the dependencies of their parsers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes as-is look good to me, although I would not necessarily object to more iteration. @justingrant's point about similarity is valid, and elsewhere in ECMA-402 we do have the concept of a "structurally valid language tag", which is broader than the list of supported locale identifiers that appear in an Available Locales List.
I quite like the idea of "structurally valid time zone identifier", does that make it clear enough that it's parseable but not necessarily available? |
We'd probably have to define that in ECMA-262, though: https://tc39.es/ecma262/#sec-time-zone-identifiers The advantage of keeping "time zone identifier" for now, is that we wouldn't need to block this PR. If we agree here that "structurally valid time zone identifier" is good, my preference would be to introduce that in ECMA-262 first, and when that makes it through the editing process I'll write PRs for ECMA-402 and Temporal using the new terminology. In the meantime, we could merge this PR. |
+1 for qualifying all instances of "time zone identifier". Sounds like we will have 3? "structurally valid", "available", and "primary"? |
There's also "non-primary".
I admit that I'm not convinced that there's a need for a new term. This space is already jumbled with different terms with names that are very similar to each other. How many uses of this term will exist? If only a few, can we just say something like this?
I also don't prefer "available time zone identifier" because it's so similar to "available named time zone identifier". Seems fine to just say "available named time zone identifier or an offset time zone identifier" if we only need it in a few places. |
In terms of sets and relationships (and using maximally precise names without committing to them), we have
|
Temporal will introduce separate definitions for 'time zone identifier' (string consisting of characters that are legal in time zone identifiers) and 'available time zone identifier' (time zone identifier that is known to the implementation.)
For some usages it's probably more appropriate to speak of available time zone identifiers than time zone identifiers. For others, it's probably more appropriate to use 'available named time zone identifier' which is a definition given in ECMA-262.