2016-08-16 12:00:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Year, Month, Day, Result, Comments
|
|
|
|
|
|
|
|
return [
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
6890,
|
2019-07-21 18:55:41 +00:00
|
|
|
18, 11, 11,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Excel 1900 Calendar Base Date
|
|
|
|
[
|
|
|
|
1,
|
2019-07-21 18:55:41 +00:00
|
|
|
1900, 1, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Day before Excel mythical 1900 leap day
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
59,
|
2019-07-21 18:55:41 +00:00
|
|
|
1900, 2, 28,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Excel mythical 1900 leap day
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
60,
|
2019-07-21 18:55:41 +00:00
|
|
|
1900, 2, 29,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2019-07-21 18:55:41 +00:00
|
|
|
// Day after Excel mythical 1900 leap day
|
2017-01-23 05:49:10 +00:00
|
|
|
61,
|
2019-07-21 18:55:41 +00:00
|
|
|
1900, 3, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2019-07-21 18:55:41 +00:00
|
|
|
// Day after Excel actual 1904 leap day
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
713,
|
2019-07-21 18:55:41 +00:00
|
|
|
1901, 12, 13,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2019-07-21 18:55:41 +00:00
|
|
|
// PHP 32-bit Earliest Date (unix timestamp)
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
714,
|
2019-07-21 18:55:41 +00:00
|
|
|
1901, 12, 14,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
1461,
|
2019-07-21 18:55:41 +00:00
|
|
|
1903, 12, 31,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Excel 1904 Calendar Base Date
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
1462,
|
2019-07-21 18:55:41 +00:00
|
|
|
1904, 1, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
1463,
|
2019-07-21 18:55:41 +00:00
|
|
|
1904, 1, 2,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
22269,
|
2019-07-21 18:55:41 +00:00
|
|
|
1960, 12, 19,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2019-07-21 18:55:41 +00:00
|
|
|
// PHP (unix timestamp) Base Date
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
25569,
|
2019-07-21 18:55:41 +00:00
|
|
|
1970, 1, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
30292,
|
2019-07-21 18:55:41 +00:00
|
|
|
1982, 12, 7,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39611,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 6, 12,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2019-07-21 18:55:41 +00:00
|
|
|
// PHP (unix timestamp) 32-bit Latest Date
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
50424,
|
2019-07-21 18:55:41 +00:00
|
|
|
2038, 1, 19,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2019-07-21 18:55:41 +00:00
|
|
|
// Day after PHP (unix timestamp) 32-bit Latest Date
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
50425,
|
2019-07-21 18:55:41 +00:00
|
|
|
2038, 1, 20,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39448,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 1, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39447,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 1, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39446,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 1, -1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39417,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 1, -30,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39416,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 1, -31,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39082,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 1, -365,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39508,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 3, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39507,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 3, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39506,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 3, -1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39142,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 3, -365,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39417,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, null, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39387,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -1, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39083,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -11, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39052,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -12, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39022,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -13, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39051,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -13, 30,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39021,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -13, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
38991,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -13, -30,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
38990,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -13, -31,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39814,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 13, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39507,
|
2019-07-21 18:55:41 +00:00
|
|
|
2007, 15, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40210,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 26, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40199,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 26, -10,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
38686,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, -26, 61,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39641,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, -15, -50,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39741,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, -15, 50,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40552,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 15, -50,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40652,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 15, 50,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40179,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 1.5, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40178,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 1.5, 0,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40148,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 0, 1.5,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40179,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 1, 1.5,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
41075,
|
2019-07-21 18:55:41 +00:00
|
|
|
2012, 6, 15,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
41060,
|
2019-07-21 18:55:41 +00:00
|
|
|
2012, 6, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40892,
|
2019-07-21 18:55:41 +00:00
|
|
|
2012, null, 15,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
167,
|
2019-07-21 18:55:41 +00:00
|
|
|
null, 6, 15,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
3819,
|
2019-07-21 18:55:41 +00:00
|
|
|
10, 6, 15,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
3622,
|
2019-07-21 18:55:41 +00:00
|
|
|
10, null, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
274,
|
2019-07-21 18:55:41 +00:00
|
|
|
null, 10, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#NUM!',
|
2019-07-21 18:55:41 +00:00
|
|
|
null, null, 10,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#NUM!',
|
2019-07-21 18:55:41 +00:00
|
|
|
-20, null, null,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#NUM!',
|
2019-07-21 18:55:41 +00:00
|
|
|
-20, 6, 15,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Excel Maximum Date
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
2958465,
|
2019-07-21 18:55:41 +00:00
|
|
|
9999, 12, 31,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Exceeded Excel Maximum Date
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#NUM!',
|
2019-07-21 18:55:41 +00:00
|
|
|
10000, 1, 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39670,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 8, 10,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39813,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 12, 31,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39692,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 8, 32,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39844,
|
2019-07-21 18:55:41 +00:00
|
|
|
2008, 13, 31,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39813,
|
2019-07-21 18:55:41 +00:00
|
|
|
2009, 1, 0,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39812,
|
2019-07-21 18:55:41 +00:00
|
|
|
2009, 1, -1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39782,
|
2019-07-21 18:55:41 +00:00
|
|
|
2009, 0, 0,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39781,
|
2019-07-21 18:55:41 +00:00
|
|
|
2009, 0, -1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39752,
|
2019-07-21 18:55:41 +00:00
|
|
|
2009, -1, 0,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
39751,
|
2019-07-21 18:55:41 +00:00
|
|
|
2009, -1, -1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40146,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 0, -1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40329,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 5, 31,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2016-08-16 14:24:47 +00:00
|
|
|
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40199,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 1, '21st',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2016-08-16 14:24:47 +00:00
|
|
|
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40258,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 'March', '21st',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2016-08-16 14:24:47 +00:00
|
|
|
// MS Excel will fail with a #VALUE return, but PhpSpreadsheet can parse this date
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
40258,
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 'March', 21,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#VALUE!',
|
2019-07-21 18:55:41 +00:00
|
|
|
'ABC', 1, 21,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#VALUE!',
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 'DEF', 21,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#VALUE!',
|
2019-07-21 18:55:41 +00:00
|
|
|
2010, 3, 'GHI',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
];
|