2016-08-16 12:00:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
52,
|
2019-07-25 19:02:41 +00:00
|
|
|
'21-Dec-2000', 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2016-10-01 13:27:41 +00:00
|
|
|
[
|
|
|
|
1,
|
2019-07-25 19:02:41 +00:00
|
|
|
'2000-01-01', 1,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
2,
|
2019-07-25 19:02:41 +00:00
|
|
|
'2000-01-02', 1,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
1,
|
2019-07-25 19:02:41 +00:00
|
|
|
'2000-01-01', 2,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
2,
|
2019-07-25 19:02:41 +00:00
|
|
|
'2000-01-03', 2,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
|
|
|
1,
|
2019-07-25 19:02:41 +00:00
|
|
|
'1995-01-01', 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
2016-10-01 13:27:41 +00:00
|
|
|
[
|
|
|
|
1,
|
2019-07-25 19:02:41 +00:00
|
|
|
'1995-01-07', 1,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
2,
|
2019-07-25 19:02:41 +00:00
|
|
|
'1995-01-08', 1,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
1,
|
2019-07-25 19:02:41 +00:00
|
|
|
'1995-01-01', 2,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
2,
|
2019-07-25 19:02:41 +00:00
|
|
|
'1995-01-02', 2,
|
2016-10-01 13:27:41 +00:00
|
|
|
],
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2016-10-01 13:27:41 +00:00
|
|
|
28,
|
2017-01-23 05:49:10 +00:00
|
|
|
'3/7/1977',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#VALUE!',
|
2019-07-25 19:02:41 +00:00
|
|
|
'3/7/1977', 'A',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#NUM!',
|
2019-07-25 19:02:41 +00:00
|
|
|
'3/7/1977', 0,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
Changes to WEEKNUM and YEARFRAC (#1316)
* Changes to WEEKNUM and YEARFRAC
The optional second parameter for WEEKNUM can take any of 10 values
(1, 2, 11-17, and 21), but currently only 1 and 2 are supported.
This change adds support for the other 8 possibilities.
YEARFRAC in Excel does not require that end date be before start date,
but PhpSpreadsheet was returning an error in that situation.
YEARFRAC third parameter (method) of 1 was not correctly implemented.
I was able to find a description of the algorithm, and documented
that location in the code, and implemented according to that spec.
PHPExcel had a (failing) test to assert the result of
YEARFRAC("1960-12-19", "2008-06-28", 1). This test had been dropped
from PhpSpreadsheet, and is now restored; several new tests have
been added, and verified against Excel.
* Add YEARFRAC Tests
Scrutinizer reported a very mysterious failure with no details.
project.metric_change("scrutinizer.test_coverage", < 0),
without even a link to explain what it is reporting.
It is possible that it was a complaint about code coverage.
If so, I have added some tests which will, I hope, eliminate the problem.
* Make Array Constant
Responding to review from Mark Baker.
* Merge with PR 1362 Bugfix 1161
Travis CI reported problem with Calculation.php (which is not part
of this change).
That was changed in master a few days ago
(delete some unused code).
Perhaps the lack of that change is the problem here.
Merging it manually.
2020-02-19 19:22:31 +00:00
|
|
|
[
|
|
|
|
'#NUM!',
|
|
|
|
'3/7/1977', -1,
|
|
|
|
],
|
2016-08-16 12:00:19 +00:00
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#VALUE!',
|
2019-07-25 19:02:41 +00:00
|
|
|
'Invalid', 1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
2017-01-23 05:49:10 +00:00
|
|
|
-1,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
Changes to WEEKNUM and YEARFRAC (#1316)
* Changes to WEEKNUM and YEARFRAC
The optional second parameter for WEEKNUM can take any of 10 values
(1, 2, 11-17, and 21), but currently only 1 and 2 are supported.
This change adds support for the other 8 possibilities.
YEARFRAC in Excel does not require that end date be before start date,
but PhpSpreadsheet was returning an error in that situation.
YEARFRAC third parameter (method) of 1 was not correctly implemented.
I was able to find a description of the algorithm, and documented
that location in the code, and implemented according to that spec.
PHPExcel had a (failing) test to assert the result of
YEARFRAC("1960-12-19", "2008-06-28", 1). This test had been dropped
from PhpSpreadsheet, and is now restored; several new tests have
been added, and verified against Excel.
* Add YEARFRAC Tests
Scrutinizer reported a very mysterious failure with no details.
project.metric_change("scrutinizer.test_coverage", < 0),
without even a link to explain what it is reporting.
It is possible that it was a complaint about code coverage.
If so, I have added some tests which will, I hope, eliminate the problem.
* Make Array Constant
Responding to review from Mark Baker.
* Merge with PR 1362 Bugfix 1161
Travis CI reported problem with Calculation.php (which is not part
of this change).
That was changed in master a few days ago
(delete some unused code).
Perhaps the lack of that change is the problem here.
Merging it manually.
2020-02-19 19:22:31 +00:00
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2019-12-29', 1,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2019-12-29', 2,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
|
|
|
'2019-12-29', 3,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
|
|
|
'2019-12-29', 10,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2019-12-29', 11,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2019-12-29', 12,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2019-12-29', 13,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2019-12-29', 14,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2019-12-29', 15,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2019-12-29', 16,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2019-12-29', 17,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
|
|
|
'2019-12-29', 18,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
|
|
|
'2019-12-29', 20,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
|
|
|
'2019-12-29', 22,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2019-12-29', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2020-12-29', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2021-12-29', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2022-12-29', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
1,
|
|
|
|
'2020-01-01', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
53,
|
|
|
|
'2021-01-01', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2022-01-01', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
52,
|
|
|
|
'2023-01-01', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
2,
|
|
|
|
'2020-01-08', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
1,
|
|
|
|
'2021-01-08', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
1,
|
|
|
|
'2022-01-08', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
1,
|
|
|
|
'2023-01-08', 21,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
1,
|
|
|
|
'2025-12-29', 21,
|
|
|
|
],
|
2016-08-16 12:00:19 +00:00
|
|
|
];
|