-
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
Temporal.TimeZone.prototype.equals: Missing call to ToTemporalTimeZoneSlotValue #41
Comments
I missed this during stage 3 review, unfortunately. I think we should just fix it since it's pretty clear what the intention was. However the current behaviour doesn't violate any assertions and would be observable, so I suspect it's technically a normative change. What do you think? |
Thinking about it some more, maybe the change does not have to be a normative change after all. By my reading, here's what I see happening for four different inputs, (1) string identifier of built-in time zone, (2) other string, (3) instance of Temporal.TimeZone, (4) plain object implementing TimeZone protocol, (5) other plain object, (6) other non-string non-object value.
So it looks like the spec is unimplementable as written and therefore this may be classified as an editorial change after all. What do you think? |
Without this, we will fail some assertions in the case of a non-string argument, or a string argument that's not a valid time zone identifier. In the plain object case, we'll also miss some Has calls in ObjectImplementsTemporalTimeZoneProtocol. Closes: tc39#41
#42 is a possible fix. |
Yes, that's correct. The current spec isn't actually implementable. |
Good catch finding this! Given that this proposal has already been merged into Temporal, I assume that the fix should be on the Temporal side? We can also fix it here too for comprehensiveness, but the fix that really matters for implementers will be in Temporal, right? |
Yes, I'd copy the fix into Temporal once it landed here. |
Cool. I'll review the PR shortly and so we should be able to turn this around quickly. And I agree that this is editorial because the current spec is not implementable. |
Without this, we will fail some assertions in the case of a non-string argument, or a string argument that's not a valid time zone identifier. In the plain object case, we'll also miss some Has calls in ObjectImplementsTemporalTimeZoneProtocol. Closes: #41
Approved and merged here. @ptomato, ball is in your court now. |
From @anba in https://github.com/tc39/proposal-temporal/issues/2682:
The text was updated successfully, but these errors were encountered: