diff options
author | Julian Berman <Julian@GrayVines.com> | 2020-06-09 19:00:09 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2020-06-09 19:00:09 -0400 |
commit | 3f58e36754b3e2872a256874c1ffdd30c677f709 (patch) | |
tree | 157cf84b5880faee6fab531f6e90d36e326b99e7 /json/tests/draft4/optional/format/date-time.json | |
parent | 3b85db9769390b4dc713fbf09ab76a760e48fea3 (diff) | |
parent | 4a4930a09fa25251ad0f02395f3c6aa0fd7e3a82 (diff) | |
download | jsonschema-3f58e36754b3e2872a256874c1ffdd30c677f709.tar.gz |
Merge commit '4a4930a09fa25251ad0f02395f3c6aa0fd7e3a82'
* commit '4a4930a09fa25251ad0f02395f3c6aa0fd7e3a82':
Squashed 'json/' changes from 9d0e0eb..817b724
Diffstat (limited to 'json/tests/draft4/optional/format/date-time.json')
-rw-r--r-- | json/tests/draft4/optional/format/date-time.json | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/json/tests/draft4/optional/format/date-time.json b/json/tests/draft4/optional/format/date-time.json new file mode 100644 index 0000000..dfccee6 --- /dev/null +++ b/json/tests/draft4/optional/format/date-time.json @@ -0,0 +1,53 @@ +[ + { + "description": "validation of date-time strings", + "schema": {"format": "date-time"}, + "tests": [ + { + "description": "a valid date-time string", + "data": "1963-06-19T08:30:06.283185Z", + "valid": true + }, + { + "description": "a valid date-time string without second fraction", + "data": "1963-06-19T08:30:06Z", + "valid": true + }, + { + "description": "a valid date-time string with plus offset", + "data": "1937-01-01T12:00:27.87+00:20", + "valid": true + }, + { + "description": "a valid date-time string with minus offset", + "data": "1990-12-31T15:59:50.123-08:00", + "valid": true + }, + { + "description": "a invalid day in date-time string", + "data": "1990-02-31T15:59:60.123-08:00", + "valid": false + }, + { + "description": "an invalid offset in date-time string", + "data": "1990-12-31T15:59:60-24:00", + "valid": false + }, + { + "description": "an invalid date-time string", + "data": "06/19/1963 08:30:06 PST", + "valid": false + }, + { + "description": "case-insensitive T and Z", + "data": "1963-06-19t08:30:06.283185z", + "valid": true + }, + { + "description": "only RFC3339 not all of ISO 8601 are valid", + "data": "2013-350T01:01:01", + "valid": false + } + ] + } +] |