ecma402
ecma402 copied to clipboard
ECMA-402 should allow numeric-offset host time zones
Among other things, this would remove the need for ECMA-402 Temporal to override ECMA-262 DefaultTimeZone.
Should this be a discussion over at tc39/ecma402 instead?
I'm considering it a change that would be part of Temporal, but if it makes more sense to discuss there then that's fine.
I think all the necessary changes on the Temporal side are in https://github.com/tc39/proposal-temporal/pull/2171.
In ECMA-402 they would then delete their override of DefaultTimeZone and ensure that all of its callers are prepared to deal with a numeric-offset time zone. I think that further discussion should be had over there, because it doesn't affect Temporal.
Affirmed by https://github.com/tc39/ecma262/pull/2781 : https://github.com/tc39/ecma262/pull/2781#discussion_r989222467
For example:
new Intl.DateTimeFormat("en", { timeZone: "+01:00" })
Feel free to hide this comment afterwards - I think you want timeZone: '+01:00' in the code example though?
TG2 discussion: https://github.com/tc39/ecma402/blob/master/meetings/notes-2022-12-08.md#ecma-402-should-allow-numeric-offset-host-time-zones-683
Conclusion: Yes, move forward with a PR for this. @gibson042 kindly volunteered to make the PR.
TG2 discussion: https://github.com/tc39/ecma402/blob/master/meetings/notes-2022-12-08.md#ecma-402-should-allow-numeric-offset-host-time-zones-683
Conclusion: Yes, move forward with a PR for this. @gibson042 kindly volunteered to make the PR.
@gibson042 - Is there a PR? Asking because a PR to resolve #741 may end up touching the same parts of the spec, so we should coordinate.
Note, completing this issue should also remove the "If IsTimeZoneOffsetString(timeZone) is true, throw a RangeError exception." step from Temporal.ZonedDateTime.prototype.toLocaleString.
Note, completing this issue should also remove the "If IsTimeZoneOffsetString(timeZone) is true, throw a RangeError exception." step from Temporal.ZonedDateTime.prototype.toLocaleString.
It's possible that future PRs (I'm working on one now!) may introduce other blocks of offset strings, so doing a full search for If IsTimeZoneOffsetString in intl.html in the Temporal spec is probably a good idea.
@gibson042 - are you still on track to have a PR for this issue available for this week's TG2 meeting?
pull request: #788
I need to investigate the cost to make the dft.resolvedOptions().timeZone return "+01:00"