Skip to content

Commit 3aa603f

Browse files
committed
adds tests for non zero-padded dates
1 parent ec18a7d commit 3aa603f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
"description": "only RFC3339 not all of ISO 8601 are valid",
1818
"data": "2013-350",
1919
"valid": false
20+
},
21+
{
22+
"description": "invalidates non-padded month dates",
23+
"data": "1998-1-20",
24+
"valid": false
25+
},
26+
{
27+
"description": "invalidates non-padded day dates",
28+
"data": "1998-01-1",
29+
"valid": false
2030
}
2131
]
2232
}

tests/draft7/optional/format/date.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
"description": "only RFC3339 not all of ISO 8601 are valid",
1818
"data": "2013-350",
1919
"valid": false
20+
},
21+
{
22+
"description": "invalidates non-padded month dates",
23+
"data": "1998-1-20",
24+
"valid": false
25+
},
26+
{
27+
"description": "invalidates non-padded day dates",
28+
"data": "1998-01-1",
29+
"valid": false
2030
}
2131
]
2232
}

0 commit comments

Comments
 (0)