-
Notifications
You must be signed in to change notification settings - Fork 183
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
Restrict Time to temporal range, remove arithmetic #6002
base: main
Are you sure you want to change the base?
Conversation
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.
Fine with me but want @zbraniecki sign-off on this.
I don't really see the "problem" with allowing the larger values, especially if we aren't doing arithmetic with them. We allow them in formatting, which seems fine.
I think we shouldn't format times like |
This makes us not handle |
yes |
This will break compatibility with ISO 8601. Are we ok with this? |
ISO 8601 requires only 24:00:00, right? |
I thiiink so? I requested access to ISO 8601, but I haven't read it yet myself. I also tried to deduct from Temporal if they target strict set or subset of ISO8601. No luck. @sffc ? |
Temporal only requires 00:00:00..23:59:59, Shane linked to it in the issue. |
Ok, so Temporal supports a subset of ISO 8601? Are we ok anchoring on Temporal instead of ISO 8601? I think I'm fine with that, but prefer to have this be a group alignment. :) |
I think we should add 24:00:00 back. If the string "24:00:00" doesn't parse anymore, then our IXDTF parser isn't compliant anymore (unless it special-cases 24:00:00 to become 00:00:00 on the next day, but that's more arithmetic than I like during parsing). |
Temporal uses RFC 9557 which is based on RFC 3339 which states
https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6 Whereas Temporal states
https://tc39.es/proposal-temporal/#sec-temporal-isvalidtime ISO 8601-1 (2019) states
and
and
In other words, there is no provision in any of these specifications for the "exclusive bound" to be represented (24:00:00, 00:60:00, or 00:00:61). So I think it's safe to remove those. But probably we should allow seconds with a value of 60. Our job is to represent things that clients may reasonably want to represent when formatting. We are in the business of formatting. I think |
RFC 3339 states
But, my copy of ISO 8601-1 (2019) specifically calls out that 24 is not allowed. Perhaps previous versions of ISO 8601-1 allowed this. |
Yes, I'm aligned. I got a hold of the ISO. |
Fixes #5987