@@ -163,18 +163,30 @@ public function edtfDateFormatProvider(): array {
163
163
'input ' => '1985-04-12 ' ,
164
164
'expected ' => '1985-04-12 ' ,
165
165
],
166
- 'Year ' => [
167
- 'input ' => '1975 ' ,
168
- 'expected ' => '1975 ' ,
166
+ 'Date - reduced precision - year and month ' => [
167
+ 'input ' => '1985-04 ' ,
168
+ 'expected ' => '1985-04 ' ,
169
169
],
170
- 'Year-month ' => [
171
- 'input ' => '2025-02 ' ,
172
- 'expected ' => '2025-02 ' ,
170
+ 'Date - reduced precision - year ' => [
171
+ 'input ' => '1985 ' ,
172
+ 'expected ' => '1985 ' ,
173
173
],
174
- 'Date and time (no TZ) ' => [
174
+ 'Date and time - local ' => [
175
175
'original ' => '2024-10-15T12:00:00 ' ,
176
176
'formatted ' => '2024-10-15 12:00:00 ' ,
177
177
],
178
+ 'Date and time - Z ' => [
179
+ 'original ' => '1985-04-12T23:20:30Z ' ,
180
+ 'formatted ' => '1985-04-12 23:20:30Z ' ,
181
+ ],
182
+ 'Date and time - shift in hours ' => [
183
+ 'original ' => '1985-04-12T23:20:30+04 ' ,
184
+ 'formatted ' => '1985-04-12 23:20:30+04 ' ,
185
+ ],
186
+ 'Date and time - shift in hours and minutes ' => [
187
+ 'original ' => '1985-04-12T23:20:30+04:30 ' ,
188
+ 'formatted ' => '1985-04-12 23:20:30+04:30 ' ,
189
+ ],
178
190
179
191
// EDTF level 1.
180
192
'Uncertain year ' => [
@@ -197,6 +209,10 @@ public function edtfDateFormatProvider(): array {
197
209
'original ' => '2024-10 ' ,
198
210
'formatted ' => '2024-10 ' ,
199
211
],
212
+ 'Unspecified digits from right ' => [
213
+ 'input ' => '198X ' ,
214
+ 'expected ' => 'Unknown year in the decade of the 1980s ' ,
215
+ ],
200
216
201
217
// Invalid/edge cases.
202
218
'Empty input ' => [
0 commit comments