PhpSpreadsheet/tests/data/Calculation
oleibman cb18163a1d
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 20:22:31 +01:00
..
DateTime Changes to WEEKNUM and YEARFRAC (#1316) 2020-02-19 20:22:31 +01:00
Engineering Refactor engineering tests (#1106) 2019-07-25 21:02:41 +02:00
Financial Validate XIRR inputs and return correct error values 2019-11-17 21:17:12 +01:00
Functions Fixed Functions->ifCondition for allowing <> and empty condition 2019-11-17 21:03:11 +01:00
Logical Fix IF implementation to comply with Excel behavior 2019-11-17 18:26:33 +01:00
LookupRef Merge branch 'master' into Further-Test-Refactoring 2019-09-20 16:04:36 -07:00
MathTrig Added support for the base function (#1344) 2020-02-19 20:12:30 +01:00
Statistical Improved tests (#1110) 2019-07-26 22:21:17 +02:00
TextData Upgrade to phpunit 7.5 2019-07-24 23:45:43 -07:00
Calculation.php Fix branch pruning resolution of non boolean conditions 2019-11-10 22:59:09 +01:00