PhpSpreadsheet/tests/data/Calculation/DateTime
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
..
DATE.php As always, falling foul of codesniffer 2019-07-30 19:07:24 +02:00
DATEDIF.php Refactoring of math trig tests (#1102) 2019-07-23 00:50:30 +02:00
DATEVALUE.php Fix date tests withut specified year for current year 2020 (#1302) 2020-01-03 23:24:45 +01:00
DAY.php Refactoring of math trig tests (#1102) 2019-07-23 00:50:30 +02:00
DAYS.php Refactoring of math trig tests (#1102) 2019-07-23 00:50:30 +02:00
DAYS360.php Refactoring of math trig tests (#1102) 2019-07-23 00:50:30 +02:00
EDATE.php Refactoring of math trig tests (#1102) 2019-07-23 00:50:30 +02:00
EOMONTH.php Refactoring of math trig tests (#1102) 2019-07-23 00:50:30 +02:00
HOUR.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
ISOWEEKNUM.php Add further new Functions introduced in MS Excel 2013 and 2016 (#608) 2018-07-22 19:17:04 +01:00
MINUTE.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
MONTH.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
NETWORKDAYS.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
SECOND.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
TIME.php Refactoring of date time tests (#1101) 2019-07-21 20:55:41 +02:00
TIMEVALUE.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
WEEKDAY.php Refactoring of date time tests (#1101) 2019-07-21 20:55:41 +02:00
WEEKNUM.php Changes to WEEKNUM and YEARFRAC (#1316) 2020-02-19 20:22:31 +01:00
WORKDAY.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
YEAR.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
YEARFRAC.php Changes to WEEKNUM and YEARFRAC (#1316) 2020-02-19 20:22:31 +01:00