Debian Codegraph @

spec/JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/date-time.json

raw ◀ ▶
2 Debian patches touch this file
•1 [
2 {
3 "description": "validation of date-time strings",
4 "schema": { "format": "date-time" },
5 "tests": [
6 {
7 "description": "all string formats ignore integers",
8 "data": 12,
9 "valid": true
10 },
11 {
12 "description": "all string formats ignore floats",
13 "data": 13.7,
14 "valid": true
15 },
16 {
17 "description": "all string formats ignore objects",
18 "data": {},
19 "valid": true
20 },
21 {
22 "description": "all string formats ignore arrays",
23 "data": [],
24 "valid": true
25 },
26 {
27 "description": "all string formats ignore booleans",
28 "data": false,
29 "valid": true
30 },
31 {
32 "description": "all string formats ignore nulls",
33 "data": null,
34 "valid": true
35 },
36 {
37 "description": "a valid date-time string",
38 "data": "1963-06-19T08:30:06.283185Z",
39 "valid": true
40 },
41 {
42 "description": "a valid date-time string without second fraction",
43 "data": "1963-06-19T08:30:06Z",
44 "valid": true
45 },
46 {
47 "description": "a valid date-time string with plus offset",
48 "data": "1937-01-01T12:00:27.87+00:20",
49 "valid": true
50 },
51 {
52 "description": "a valid date-time string with minus offset",
53 "data": "1990-12-31T15:59:50.123-08:00",
54 "valid": true
55 },
56 {
57 "description": "a valid date-time with a leap second, UTC",
58 "data": "1998-12-31T23:59:60Z",
59 "valid": true
60 },
61 {
62 "description": "an invalid date-time past leap second, UTC",
63 "data": "1998-12-31T23:59:61Z",
64 "valid": false
65 },
66 {
67 "description": "an invalid date-time with leap second on a wrong minute, UTC",
68 "data": "1998-12-31T23:58:60Z",
69 "valid": false
70 },
71 {
72 "description": "an invalid date-time with leap second on a wrong hour, UTC",
73 "data": "1998-12-31T22:59:60Z",
74 "valid": false
75 },
76 {
77 "description": "an invalid day in date-time string",
78 "data": "1990-02-31T15:59:59.123-08:00",
79 "valid": false
80 },
81 {
82 "description": "an invalid closing Z after time-zone offset",
83 "data": "1963-06-19T08:30:06.28123+01:00Z",
84 "valid": false
85 },
86 {
87 "description": "an invalid date-time string",
88 "data": "06/19/1963 08:30:06 PST",
89 "valid": false
90 },
91 {
92 "description": "case-insensitive T and Z",
93 "data": "1963-06-19t08:30:06.283185z",
94 "valid": true
95 },
96 {
97 "description": "only RFC3339 not all of ISO 8601 are valid",
98 "data": "2013-350T01:01:01",
99 "valid": false
100 },
101 {
102 "description": "invalid non-padded month dates",
103 "data": "1963-6-19T08:30:06.283185Z",
104 "valid": false
105 },
106 {
107 "description": "invalid non-padded day dates",
108 "data": "1963-06-1T08:30:06.283185Z",
109 "valid": false
110 },
111 {
112 "description": "non-ascii digits should be rejected in the date portion",
113 "data": "1963-06-1৪T00:00:00Z",
114 "valid": false
115 },
116 {
117 "description": "non-ascii digits should be rejected in the time portion",
118 "data": "1963-06-11T0৪:00:00Z",
119 "valid": false
120 }
121 ]
122 }
123 ]