Skip to content

Adds tests for non zero-padded dates #426

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
merged 4 commits into from
Aug 14, 2020
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
10 changes: 10 additions & 0 deletions tests/draft2019-09/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350T01:01:01",
"valid": false
},
{
"description": "invalid non-padded month dates",
"data": "1963-6-19T08:30:06.283185Z",
"valid": false
},
{
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft2019-09/optional/format/date.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350",
"valid": false
},
{
"description": "invalidates non-padded month dates",
"data": "1998-1-20",
"valid": false
},
{
"description": "invalidates non-padded day dates",
"data": "1998-01-1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft3/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350T01:01:01",
"valid": false
},
{
"description": "invalid non-padded month dates",
"data": "1963-6-19T08:30:06.283185Z",
"valid": false
},
{
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
}
]
}
Expand Down
15 changes: 15 additions & 0 deletions tests/draft3/optional/format/date.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
"description": "an invalid date string",
"data": "06/19/1963",
"valid": false
},
{
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350",
"valid": false
},
{
"description": "invalidates non-padded month dates",
"data": "1998-1-20",
"valid": false
},
{
"description": "invalidates non-padded day dates",
"data": "1998-01-1",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft4/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350T01:01:01",
"valid": false
},
{
"description": "invalid non-padded month dates",
"data": "1963-6-19T08:30:06.283185Z",
"valid": false
},
{
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
}
]
}
Expand Down
12 changes: 11 additions & 1 deletion tests/draft6/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"description": "an invalid closing Z after time-zone offset",
"data": "1963-06-19T08:30:06.28123+01:00Z",
"valid": false
},
},
{
"description": "an invalid date-time string",
"data": "06/19/1963 08:30:06 PST",
Expand All @@ -52,6 +52,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350T01:01:01",
"valid": false
},
{
"description": "invalid non-padded month dates",
"data": "1963-6-19T08:30:06.283185Z",
"valid": false
},
{
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft7/optional/format/date-time.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350T01:01:01",
"valid": false
},
{
"description": "invalid non-padded month dates",
"data": "1963-6-19T08:30:06.283185Z",
"valid": false
},
{
"description": "invalid non-padded day dates",
"data": "1963-06-1T08:30:06.283185Z",
"valid": false
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions tests/draft7/optional/format/date.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350",
"valid": false
},
{
"description": "invalidates non-padded month dates",
"data": "1998-1-20",
"valid": false
},
{
"description": "invalidates non-padded day dates",
"data": "1998-01-1",
"valid": false
}
]
}
Expand Down