Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

incorporate RFC 9557 time zone extension into 'date-time' format #1609

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

Merged
gregsdennis merged 5 commits into main from gregsdennis/datetime-rfc-9557
Jul 21, 2025

Conversation

Copy link
Member

@gregsdennis gregsdennis commented Jun 21, 2025
edited
Loading

What kind of change does this PR introduce?

Enhancement

Issue & Discussion References

Summary

Extends the date-time format by incorporating time zone information from RFC 9557.

Does this PR introduce a breaking change?

(削除) No (削除ここまで) Yes? date-time strings that would have previously failed would now pass.

Copy link
Member

Isn't this a breaking change, if strings that were invalid before are now considered valid?

Copy link
Member Author

That's what I was thinking, too. Someone mentioned it wasn't, and I failed to research it.

Copy link
Member

@Relequestual Relequestual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this would be a breaking change.

Additionally, note we specify the duration format from ISO 8601 as per RFC 3339 Appendix A.

RFC 3339 Appendix A notes...

This information is based on the 1988 version of ISO 8601. There may
be some changes in the 2000 revision.

I'm positive we discussed before and opted to not reference ISO directly because of the paywall nature of the standard.

Copy link
Contributor

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments from someone familiar with RFC 3339, RFC 9557, and ISO 8601.

jdesrosiers reacted with thumbs up emoji
Comment on lines 405 to 406
valid representation according to the "date-time" ABNF rule in RFC 3339,
optionally with the "time-zone" rule in RFC 9557
Copy link
Contributor

@gibson042 gibson042 Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is not clear to me... is the intent to allow a subset of the RFC 9557 grammar that includes time-zone but not suffix-tag? If so, I think that should be more explicit:

Suggested change
valid representation according to the "date-time" ABNF rule in RFC 3339,
optionally with the "time-zone" rule in RFC 9557
valid representation of the "date-time" ABNF rule in RFC 3339 or such a
string that is immediately followed by a valid representation of the
"time-zone" rule in RFC 9557

Copy link
Member Author

@gregsdennis gregsdennis Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, I see. I had stopped in that block in 9557 at time-zone and didn't continue on to see suffix. That should certainly be included.

I think what we're looking for here is date-time-ext, except that suffix is optional. I'll update this.

Copy link
Member

Yeah, I read that the update to date-time has not changed the syntax, the only update around date-time is to align Z with the common usage of "no time zone".

Copy link
Member

Isn't this a breaking change, if strings that were invalid before are now considered valid?

I don't consider this a breaking change because format allows partial validation. If strict validation was required, it would be a different story. Every value that passed in 2020-12 would still pass with these changes. I think this change just makes what was previously considered a strict validation implementation into a partial validation implementation.

Copy link
Member

I don't consider this a breaking change because format allows partial validation.

Fair enough. We could mention this explicitly in the spec either in the section where we talk about breaking changes, or right when formats are introduced -- that formats may in the future change to use updated RFCs that cover the same kind of content. (e.g. when RFC3986 is obsoleted, we'll want to move to the new version of that too.)

gregsdennis and Relequestual reacted with thumbs up emoji

@gregsdennis gregsdennis requested review from Relequestual, gibson042, karenetheridge, jdesrosiers and a team and removed request for gibson042 July 13, 2025 03:38
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
@gregsdennis gregsdennis merged commit 40962bb into main Jul 21, 2025
6 checks passed
@gregsdennis gregsdennis deleted the gregsdennis/datetime-rfc-9557 branch July 21, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@mwadams mwadams mwadams left review comments

@jdesrosiers jdesrosiers jdesrosiers approved these changes

@Relequestual Relequestual Relequestual approved these changes

@karenetheridge karenetheridge Awaiting requested review from karenetheridge

+1 more reviewer

@gibson042 gibson042 gibson042 approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Projects
Development

Successfully merging this pull request may close these issues.

✨ Proposal: date-time format to accept those in RFC 9557

AltStyle によって変換されたページ (->オリジナル) /