PhpSpreadsheet/tests/data/Calculation/DateTime
Mark Baker a911e9bb7b
Calculation engine empty arguments (#2143)
* Initia work on differentiating between empty arguments and null arguments passed to Excel functions

Previously we always passed a null value for an empty argument (i.e. where there was an argument separator in the function call without an argument.... PHP doesn't support empty arguments, so we needed to provide some value but then it wasn't possible to differentiate between a genuine null argument (either a literal null, or a null cell value) and the null that we were passing to represent an empty argument value.

This change evaluates empty arguments within the calculation engine, and instead of passing a null, it reads the signature of the required Excel function, and passes the default value for that argument; so now a null argument really does mean a null value argument.

* If the Excel function implementation doesn't accept any arguments; or once we reach a variadic argument, or try to pass more arguments than the method supports in its signature, then there's no point in checking for defaults, and to do so will lead to PHP errors, so break out of the default replacement loop
2021-06-10 08:49:53 +02:00
..
DATE.php
DATEDIF.php
DATEVALUE.php
DAY.php
DAYOpenOffice.php
DAYS.php
DAYS360.php
EDATE.php
EOMONTH.php
HOUR.php
ISOWEEKNUM.php
ISOWEEKNUM1904.php
MINUTE.php
MONTH.php
NETWORKDAYS.php
SECOND.php
TIME.php
TIMEVALUE.php
WEEKDAY.php
WEEKNUM.php Calculation engine empty arguments (#2143) 2021-06-10 08:49:53 +02:00
WEEKNUM1904.php
WORKDAY.php
YEAR.php
YEARFRAC.php