Files
Adrien Crivelli ec4098c8fd Strict mode for all tests
While we might never be able to have 100% of our code strict, we can at
the very least do it for all of our tests. This ensures that our tests
are using our API with the types as intended by the test author, and not
silently be cast to what our API requires.
2023-09-07 17:44:56 +08:00

75 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
// DateTime object Result Comments
return [
// Excel 1900 base calendar date
[
1.0,
new DateTime('1900-01-01'),
],
// This and next test show gap for the mythical
[
59.0,
new DateTime('1900-02-28'),
],
// MS Excel 1900 Leap Year
[
61.0,
new DateTime('1900-03-01'),
],
// Unix Timestamp 32-bit Earliest Date
[
714.0,
new DateTime('1901-12-14'),
],
[
1461.0,
new DateTime('1903-12-31'),
],
// Excel 1904 Calendar Base Date
[
1462.0,
new DateTime('1904-01-01'),
],
[
1463.0,
new DateTime('1904-01-02'),
],
[
22269.0,
new DateTime('1960-12-19'),
],
// Unix Timestamp Base Date
[
25569.0,
new DateTime('1970-01-01'),
],
[
30292.0,
new DateTime('1982-12-07'),
],
[
39611.0,
new DateTime('2008-06-12'),
],
// Unix Timestamp 32-bit Latest Date
[
50424.0,
new DateTime('2038-01-19'),
],
[
1234.56789,
new DateTime('1903-05-18 13:37:46'),
],
[
12345.6789,
new DateTime('1933-10-18 16:17:37'),
],
[
73050.0,
new DateTime('2099-12-31'),
],
];