Skip to content

Commit c8c0bdd

Browse files
committed
Squashed 'json/' changes from 19947eaa1..0788c226a
0788c226a Merge pull request #659 from jvtm/python311-date-iso8601-values 4248f3c73 test: cover ISO8601 date values accepted by Python 3.11 datetime module git-subtree-dir: json git-subtree-split: 0788c226aa30f5e8fa862f4aa80e59a0f5186597
1 parent 5e16d74 commit c8c0bdd

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

tests/draft-next/optional/format/date.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,26 @@
220220
"description": "invalid non-ASCII '৪' (a Bengali 4)",
221221
"data": "1963-06-1৪",
222222
"valid": false
223+
},
224+
{
225+
"description": "ISO8601 / non-RFC3339: YYYYMMDD without dashes (2023-03-28)",
226+
"data": "20230328",
227+
"valid": false
228+
},
229+
{
230+
"description": "ISO8601 / non-RFC3339: week number implicit day of week (2023-01-02)",
231+
"data": "2023-W01",
232+
"valid": false
233+
},
234+
{
235+
"description": "ISO8601 / non-RFC3339: week number with day of week (2023-03-28)",
236+
"data": "2023-W13-2",
237+
"valid": false
238+
},
239+
{
240+
"description": "ISO8601 / non-RFC3339: week number rollover to next year (2023-01-01)",
241+
"data": "2022W527",
242+
"valid": false
223243
}
224244
]
225245
}

tests/draft2019-09/optional/format/date.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,26 @@
220220
"description": "invalid non-ASCII '৪' (a Bengali 4)",
221221
"data": "1963-06-1৪",
222222
"valid": false
223+
},
224+
{
225+
"description": "ISO8601 / non-RFC3339: YYYYMMDD without dashes (2023-03-28)",
226+
"data": "20230328",
227+
"valid": false
228+
},
229+
{
230+
"description": "ISO8601 / non-RFC3339: week number implicit day of week (2023-01-02)",
231+
"data": "2023-W01",
232+
"valid": false
233+
},
234+
{
235+
"description": "ISO8601 / non-RFC3339: week number with day of week (2023-03-28)",
236+
"data": "2023-W13-2",
237+
"valid": false
238+
},
239+
{
240+
"description": "ISO8601 / non-RFC3339: week number rollover to next year (2023-01-01)",
241+
"data": "2022W527",
242+
"valid": false
223243
}
224244
]
225245
}

tests/draft2020-12/optional/format/date.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,26 @@
220220
"description": "invalid non-ASCII '৪' (a Bengali 4)",
221221
"data": "1963-06-1৪",
222222
"valid": false
223+
},
224+
{
225+
"description": "ISO8601 / non-RFC3339: YYYYMMDD without dashes (2023-03-28)",
226+
"data": "20230328",
227+
"valid": false
228+
},
229+
{
230+
"description": "ISO8601 / non-RFC3339: week number implicit day of week (2023-01-02)",
231+
"data": "2023-W01",
232+
"valid": false
233+
},
234+
{
235+
"description": "ISO8601 / non-RFC3339: week number with day of week (2023-03-28)",
236+
"data": "2023-W13-2",
237+
"valid": false
238+
},
239+
{
240+
"description": "ISO8601 / non-RFC3339: week number rollover to next year (2023-01-01)",
241+
"data": "2022W527",
242+
"valid": false
223243
}
224244
]
225245
}

tests/draft7/optional/format/date.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,26 @@
217217
"description": "invalid non-ASCII '৪' (a Bengali 4)",
218218
"data": "1963-06-1৪",
219219
"valid": false
220+
},
221+
{
222+
"description": "ISO8601 / non-RFC3339: YYYYMMDD without dashes (2023-03-28)",
223+
"data": "20230328",
224+
"valid": false
225+
},
226+
{
227+
"description": "ISO8601 / non-RFC3339: week number implicit day of week (2023-01-02)",
228+
"data": "2023-W01",
229+
"valid": false
230+
},
231+
{
232+
"description": "ISO8601 / non-RFC3339: week number with day of week (2023-03-28)",
233+
"data": "2023-W13-2",
234+
"valid": false
235+
},
236+
{
237+
"description": "ISO8601 / non-RFC3339: week number rollover to next year (2023-01-01)",
238+
"data": "2022W527",
239+
"valid": false
220240
}
221241
]
222242
}

0 commit comments

Comments
 (0)