Debian Codegraph @

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

raw ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
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": "a valid date-time with a leap second, with minus offset",
63 "data": "1998-12-31T15:59:60.123-08:00",
64 "valid": true
65 },
66 {
67 "description": "an invalid date-time past leap second, UTC",
68 "data": "1998-12-31T23:59:61Z",
69 "valid": false
70 },
71 {
72 "description": "an invalid date-time with leap second on a wrong minute, UTC",
73 "data": "1998-12-31T23:58:60Z",
74 "valid": false
75 },
76 {
77 "description": "an invalid date-time with leap second on a wrong hour, UTC",
78 "data": "1998-12-31T22:59:60Z",
79 "valid": false
80 },
81 {
82 "description": "an invalid day in date-time string",
83 "data": "1990-02-31T15:59:59.123-08:00",
84 "valid": false
85 },
86 {
87 "description": "an invalid offset in date-time string",
88 "data": "1990-12-31T15:59:59-24:00",
89 "valid": false
90 },
91 {
92 "description": "an invalid closing Z after time-zone offset",
93 "data": "1963-06-19T08:30:06.28123+01:00Z",
94 "valid": false
95 },
96 {
97 "description": "an invalid date-time string",
98 "data": "06/19/1963 08:30:06 PST",
99 "valid": false
100 },
101 {
102 "description": "case-insensitive T and Z",
103 "data": "1963-06-19t08:30:06.283185z",
104 "valid": true
105 },
106 {
107 "description": "only RFC3339 not all of ISO 8601 are valid",
108 "data": "2013-350T01:01:01",
109 "valid": false
110 },
111 {
112 "description": "invalid non-padded month dates",
113 "data": "1963-6-19T08:30:06.283185Z",
114 "valid": false
115 },
116 {
117 "description": "invalid non-padded day dates",
118 "data": "1963-06-1T08:30:06.283185Z",
119 "valid": false
120 },
121 {
122 "description": "non-ascii digits should be rejected in the date portion",
123 "data": "1963-06-1৪T00:00:00Z",
124 "valid": false
125 },
126 {
127 "description": "non-ascii digits should be rejected in the time portion",
128 "data": "1963-06-11T0৪:00:00Z",
129 "valid": false
130 }
131 ]
132 }
133 ]