Skip to content
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

editor review: 402 independence #1292

Closed
ljharb opened this issue Jan 15, 2021 · 17 comments · Fixed by #1305
Closed

editor review: 402 independence #1292

ljharb opened this issue Jan 15, 2021 · 17 comments · Fixed by #1305
Assignees
Labels
question spec-text Specification text involved tc39-review
Milestone

Comments

@ljharb
Copy link
Member

ljharb commented Jan 15, 2021

from #1275 (comment):

https://tc39.es/proposal-temporal/#sec-temporal-systemtimezone depends on DefaultTimeZone, which is not an abstract operation in 262, but rather in 402. Temporal must work in the complete absence of 402.

@Ms2ger
Copy link
Collaborator

Ms2ger commented Jan 15, 2021

Presumably you mean DefaultTimeZone for the aop in 402, not SystemTimeZone.

One solution would be to move the 402 section "Time Zone Names" to 262; if you have thoughts on how to put that in the proposal, that would be helpful.

@ljharb
Copy link
Member Author

ljharb commented Jan 15, 2021

whoops, yes, updated the OP.

@ljharb
Copy link
Member Author

ljharb commented Jan 15, 2021

I'm not entirely sure what the best path is here - would all implementers be comfortable having the list of time zone names be mandatory, even when omitting 402?

@ptomato
Copy link
Collaborator

ptomato commented Jan 15, 2021

Another way to do it might be to treat "UTC" as the only time zone mentioned by name in 262, as we do with "iso8601" for calendars?

@ryzokuken
Copy link
Member

@ptomato that sounds a good solution to me as well.

@ptomato ptomato added question spec-text Specification text involved tc39-review labels Jan 15, 2021
@ptomato ptomato added this to the Stage 3 milestone Jan 15, 2021
@ljharb
Copy link
Member Author

ljharb commented Jan 15, 2021

It’s notable, though, that Date supports many timezones without 402 (presumably its implementation-defined; i haven’t checked yet), so it’d be good to word it so that impls don’t have to fully include 402 in order to offer multiple timezones.

@ptomato ptomato self-assigned this Jan 18, 2021
ptomato added a commit that referenced this issue Jan 19, 2021
The abstract operations dealing with the system time zone and the time
zone names were part of 402, but here they need to move into 262, without
obligating non-402 implementations to offer the full list of time zone
names.

Closes: #1292
@ptomato
Copy link
Collaborator

ptomato commented Jan 19, 2021

@ljharb I've made an attempt in #1305, I would like to get your opinion on that language.

ptomato added a commit that referenced this issue Jan 22, 2021
The abstract operations dealing with the system time zone and the time
zone names were part of 402, but here they need to move into 262, without
obligating non-402 implementations to offer the full list of time zone
names.

Closes: #1292
ptomato added a commit that referenced this issue Jan 22, 2021
The abstract operations dealing with the system time zone and the time
zone names were part of 402, but here they need to move into 262, without
obligating non-402 implementations to offer the full list of time zone
names.

Closes: #1292
ptomato added a commit that referenced this issue Jan 22, 2021
The abstract operations dealing with the system time zone and the time
zone names were part of 402, but here they need to move into 262, without
obligating non-402 implementations to offer the full list of time zone
names.

Closes: #1292
ptomato added a commit that referenced this issue Jan 23, 2021
The abstract operations dealing with the system time zone and the time
zone names were part of 402, but here they need to move into 262, without
obligating non-402 implementations to offer the full list of time zone
names.

Closes: #1292
@littledan
Copy link
Member

It seems like we agree on the principle here (that 262-only implementations do not need to include the IANA tzdb) but we're debating how to codify it in #1305 . I think it's fine to iterate on the wording after Stage 3, before Stage 4, and that no fix to this needs to land before Stage 3 (though it would be fine to land if it's ready).

@ljharb
Copy link
Member Author

ljharb commented Jan 25, 2021

I think it can only wait until stage 3 if we’re convinced it is possible to actually codify it in a useful way for non-402 engines. Additionally, until the separation is complete, editor review for stage 3 is more difficult.

@littledan
Copy link
Member

@ljharb Sure, I'm having trouble understanding what the concern is. There's a lot of discussion in the PR thread about editorial details; could you be a little more clear on what your semantic concern is? For example, should we refrain from the requirement that non-402 engines can serialize the current timezone?

@ljharb
Copy link
Member Author

ljharb commented Jan 25, 2021

My concern (which to be fair, is both as an editor and as a delegate) is that in the absence of 402, I want to ensure that Temporal does not have less usefulness than Date. Namely, that if Date conceptually supports my local time zone, then I think it's critical that Temporal be required to as well.

@littledan
Copy link
Member

In #1305, everyone seems to be strongly agreeing that the local time zone and UTC must both be supported. We're iterating on editorial/formalistic details, but the normative requirements are agreed on. I believe this level of progress is what we need for Stage 3. (This isn't a memory model; the effort is just to get a pretty simple point across.)

@ljharb
Copy link
Member Author

ljharb commented Jan 26, 2021

I would be content with a normative-ish placeholder note saying just that for stage 3, yes, and we can iterate on the exact text during stage 3.

ptomato added a commit that referenced this issue Jan 27, 2021
The abstract operations dealing with the system time zone and the time
zone names were part of 402, but here they need to move into 262, without
obligating non-402 implementations to offer the full list of time zone
names.

Closes: #1292
Ms2ger added a commit that referenced this issue Jan 27, 2021
#1305)

The abstract operations dealing with the system time zone and the time
zone names were part of 402, but here they need to move into 262, without
obligating non-402 implementations to offer the full list of time zone
names.

Closes: #1292

Co-authored-by: Ms2ger <Ms2ger@gmail.com>
@ptomato
Copy link
Collaborator

ptomato commented Feb 12, 2021

I realized we also have #519 open. Let's use that to discuss and make further changes.

@ljharb
Copy link
Member Author

ljharb commented Mar 3, 2021

I don't think this is resolved - https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype.tolocalestring, for example, includes "3. If the implementation does not include the ECMA-402 Internationalization API" but that's not how the spec handles this.

In other words, the AO in 262 needs to be complete in the absence of 402, and 402 replaces that AO with one that does the Intl thing.

@ptomato
Copy link
Collaborator

ptomato commented Mar 4, 2021

Oh, I see, I just missed rewriting that one to make it work like the others that I rewrote (cf. Temporal.PlainDate.prototype.toLocaleString). I'll change this.

@ljharb
Copy link
Member Author

ljharb commented Mar 4, 2021

ah, guess i just got lucky and found the only one remaining :-p

ptomato added a commit that referenced this issue Mar 6, 2021
I had missed this one in the previous rewrite, see also
#1292 (comment)
cjtenny pushed a commit that referenced this issue Mar 8, 2021
* Split Instant.toLocaleString properly into 402 addendum

I had missed this one in the previous rewrite, see also
#1292 (comment)

* Fix wrong variable name in TemporalInstantToString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question spec-text Specification text involved tc39-review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants