Skip to content

Update DateTime pattern to follows ISO 8601:2019#1245

Open
bact wants to merge 2 commits into
spdx:developfrom
bact:iso-datetime
Open

Update DateTime pattern to follows ISO 8601:2019#1245
bact wants to merge 2 commits into
spdx:developfrom
bact:iso-datetime

Conversation

@bact
Copy link
Copy Markdown
Collaborator

@bact bact commented Apr 7, 2026

Update the string pattern of DateTime. The new pattern will restrict:

  • month to 01-12
  • date to 01-31
  • hour to 00-23
  • minute to 00-59
  • second to 00-60

These restrictions are aligned with ISO 8601:2019, which the DateTime is referenced to.

Note that the "60" second is reserved only for the positive leap second at 23:59:60. See ISO 8601:2019 Clause 3.1.1.24 https://www.iso.org/obp/ui/#iso:std:iso:8601:-1:ed-1:v1:en and RFC 3339 Appendix D https://www.rfc-editor.org/rfc/rfc3339.html#appendix-D

Based on changes in SPDX 2.3.1 draft spdx/spdx-spec#1377

The new pattern will restrict:

- month to 01-12
- date to 01-31
- hour to 00-23
- minute to 00-59
- second to 00-60

This restrictions are aligned with ISO 8601:2019.

Note that the "60" second is reserved only for the positive leap second. See Clause 3.1.1.24 of ISO 8601:2019.

Based on changes in SPDX 2.3.1 draft  spdx/spdx-spec#1377

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Co-Authored-By: zbleness <77726616+zbleness@users.noreply.github.com>
@bact bact added the Profile:Core Core profile and related matters label Apr 7, 2026
@bact bact requested review from goneall and zvr April 8, 2026 07:31
Comment thread model/Core/Datatypes/DateTime.md Outdated
per review.

Also strict the leap second to 23:59:60

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact requested a review from zvr April 10, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Profile:Core Core profile and related matters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants