-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
DATEVALUE.php
297 lines (295 loc) · 5.37 KB
/
DATEVALUE.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<?php
// Date String, Result
return [
[
'#VALUE!',
'25-Dec-1899',
],
[
'#VALUE!',
'31-Dec-1899',
],
[
1,
'1-Jan-1900',
],
[
59,
'1900/2/28',
],
[
'#VALUE!',
'29-02-1900',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
'#VALUE!',
'29th February 1900',
],
[
61,
'1900/3/1',
],
[
713,
'13-12-1901',
],
[
714,
'14-12-1901',
],
[
1461,
'1903/12/31',
],
[
1462,
'1-Jan-1904',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
1463,
'2nd-Jan-1904',
],
[
22269,
'19-12-1960',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
25569,
'1st January 1970',
],
[
30292,
'7-Dec-1982',
],
[
39448,
'1-1-2008',
],
[
50424,
'2038-01-19',
],
[
39601,
'2-6-2008',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
39807,
'December 25th 2008',
],
[
39448,
'1 Jan-2008',
],
// MS Excel success or failure dependent on country settings
[
39813,
'12-31-2008',
],
// PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings
[
39813,
'31-12-2008',
],
// MS Excel success or failure dependent on country settings
[
39682,
'8/22/2008',
],
// PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings
[
39682,
'22/8/2008',
],
[
39682,
'22/8/08',
],
[
39682,
'22-AUG-2008',
],
[
39501,
'2008/02/23',
],
[
39635,
'6-7-2008',
],
// MS Excel success or failure dependent on country settings
[
39141,
'28-2-2007',
],
// PhpSpreadsheet tries to handle both US and UK formats, irrespective of country settings
[
39141,
'2-28-2007',
],
// Should fail because it's an invalid date, but PhpSpreadsheet currently adjusts to 1-3-2007 - FIX NEEDED
[
'#VALUE!',
'29-2-2007',
],
[
36161,
'1/1/1999',
],
[
19925,
'1954-07-20',
],
[
36029,
'22 August 98',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
39142,
'1st March 2007',
],
[
'#VALUE!',
'The 1st day of March 2007',
],
// 01/01 of the current year
[
44197,
'1 Jan',
],
// 31/12 of the current year
[
44561,
'31/12',
],
// Excel reads as 1st December 1931, not 31st December in current year
[
11658,
'12/31',
],
// 05/07 of the current year
[
44382,
'5-JUL',
],
// 05/07 of the current year
[
44382,
'5 Jul',
],
[
39783,
'12/2008',
],
[
11963,
'10/32',
],
[
'#VALUE!',
11,
],
[
'#VALUE!',
true,
],
[
'#VALUE!',
false,
],
[
'#VALUE!',
1,
],
[
'#VALUE!',
12345,
],
[
'#VALUE!',
12,
],
[
40221,
'12-Feb-2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40221,
'Feb-12-2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40221,
'February-12-2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40221,
'February 12 2010',
],
[
40227,
'18 Feb 2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40254,
'17th 3rd 2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40227,
'Feb 18th 2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40210,
'1st Feb 2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40210,
'1st-Feb-2010',
],
[
'#VALUE!',
'1me Fev 2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40210,
'February 1st 2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40211,
'2nd Feb 2010',
],
[
'#VALUE!',
'Second Feb 2010',
],
[
'#VALUE!',
'First August 2010',
],
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
[
40391,
'1st August 2010',
],
[
0,
'15:30:25',
],
[
'#VALUE!',
'ABCDEFGHIJKMNOPQRSTUVWXYZ',
],
];