Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schemas/2020-12/w3c/xmlschema/2001/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.w3.org/TR/xmlschema-2/#dateTime" ],
"type": "string",
"pattern": "^-?((?!0000)[0-9]{4}-(0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(?!0000)[0-9]{4}-(0[469]|11)-(0[1-9]|[12][0-9]|30)|(?!0000)[0-9]{4}-02-(0[1-9]|1[0-9]|2[0-9]))T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])?$"
"pattern": "^-?((?!0000)[0-9]{4}-(0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(?!0000)[0-9]{4}-(0[469]|11)-(0[1-9]|[12][0-9]|30)|(?!0000)[0-9]{4}-02-(0[1-9]|1[0-9]|2[0-9]))T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|24:00:00(\\.0+)?)(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$"
}
3 changes: 2 additions & 1 deletion schemas/2020-12/w3c/xmlschema/2001/duration.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
],
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.w3.org/TR/xmlschema-2/#duration" ],
"$ref": "../../../iso/datetime/2019/duration/designator-extension.json"
"type": "string",
"pattern": "^-?P(?=.)([0-9]+Y)?([0-9]+M)?([0-9]+D)?(T(?=.)([0-9]+H)?([0-9]+M)?([0-9]+(\\.[0-9]+)?S)?)?$"
}
2 changes: 1 addition & 1 deletion schemas/2020-12/w3c/xmlschema/2001/time.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.w3.org/TR/xmlschema-2/#time" ],
"type": "string",
"pattern": "^(([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?|24:00:00)(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])?$"
"pattern": "^(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|24:00:00(\\.0+)?)(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$"

@augmentcode augmentcode Bot Jul 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The regex here permits 24:00:00 with a trailing fractional part of only zeros (e.g. 24:00:00.0), but the file’s $comment says hour 24 is only valid as 24:00:00. Consider aligning the comment with the actual constraint to avoid misleading schema consumers.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

}
8 changes: 4 additions & 4 deletions test/w3c/xmlschema/2001/date-time.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"valid": true
},
{
"description": "Valid - leap second",
"description": "Invalid - leap second is not an XSD dateTime",

@augmentcode augmentcode Bot Jul 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since the timezone offset range is now constrained to ±14:00 (and minutes must be 00 when the hour is 14), consider adding tests that +14:00 is valid and e.g. +14:01/+15:00 are invalid. This would better lock in the intended correctness fix.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

"data": "2023-12-31T23:59:60Z",
"valid": true
"valid": false
},
{
"description": "Valid - negative year",
Expand Down Expand Up @@ -87,9 +87,9 @@
"valid": false
},
{
"description": "Invalid - hour 24",
"description": "Valid - hour 24 as midnight",
"data": "2023-05-15T24:00:00",
"valid": false
"valid": true
},
{
"description": "Invalid - minute 60",
Expand Down
4 changes: 2 additions & 2 deletions test/w3c/xmlschema/2001/duration.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"valid": true
},
{
"description": "Valid - negative duration with decimal",
"description": "Invalid - decimal fraction only allowed on seconds",
"data": "-PT30.5M",
"valid": true
"valid": false
},
{
"description": "Invalid - empty P",
Expand Down
4 changes: 2 additions & 2 deletions test/w3c/xmlschema/2001/time.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"valid": true
},
{
"description": "Valid - leap second",
"description": "Invalid - leap second is not an XSD time",

@augmentcode augmentcode Bot Jul 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The updated schema allows 24:00:00 with a fractional part of only zeros (e.g. 24:00:00.0), but the tests only cover 24:00:00 without fractional seconds. Adding a positive case for 24:00:00.0 (and a negative case like 24:00:00.1) would help prevent regressions around this edge case.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

"data": "23:59:60",
"valid": true
"valid": false
},
{
"description": "Invalid - hour 25",
Expand Down
Loading