| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | return [ | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.025, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-10', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
											  
											
												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
										 |  |  |     [ | 
					
						
							|  |  |  |         0.025, | 
					
						
							|  |  |  |         '2007-1-10', | 
					
						
							|  |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.024657534246580001, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-10', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.025, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-10', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.024657534246580001, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-10', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.025, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-10', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.0, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-12-31', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.99726027397259998, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-12-31', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.01111111111111, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-12-31', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.99726027397259998, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-12-31', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.99722222222222001, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-12-31', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.5, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2008-7-1', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.49658002735978, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2008-7-1', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.5194444444444399, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2008-7-1', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.4986301369863, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2008-7-1', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.5, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2008-7-1', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.083333333333329998, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.082191780821919996, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.083333333333329998, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.082191780821919996, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.080555555555560002, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.083333333333329998, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.084931506849319993, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.08611111111111, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.084931506849319993, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.083333333333329998, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.15833333333333, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-28', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.15890410958904, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.16111111111111001, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-28', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.15890410958904, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-28', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.15833333333333, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-1', | 
					
						
							|  |  |  |         '2007-2-28', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.0027777777777800001, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.0027397260273999999, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.0027777777777800001, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.0027397260273999999, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.0027777777777800001, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.08611111111111, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-1', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.07945205479452, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-1', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.080555555555560002, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-1', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.07945205479452, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-1', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.08611111111111, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-1', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.16666666666666999, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-31', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.16164383561644, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-31', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.16388888888889, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-31', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.16164383561644, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-31', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.16666666666666999, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-1-31', | 
					
						
							|  |  |  |         '2007-3-31', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.66666666666666996, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2008-1-1', | 
					
						
							|  |  |  |         '2008-9-1', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.66666666666666996, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2008-1-1', | 
					
						
							|  |  |  |         '2008-9-1', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.67777777777778003, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2008-1-1', | 
					
						
							|  |  |  |         '2008-9-1', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.66849315068492998, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2008-1-1', | 
					
						
							|  |  |  |         '2008-9-1', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         0.66666666666666996, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2008-1-1', | 
					
						
							|  |  |  |         '2008-9-1', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.1666666666666701, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         '2008-4-1', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.16279069767442, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         '2008-4-1', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.18055555555556, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         '2008-4-1', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.16438356164384, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         '2008-4-1', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         1.1666666666666701, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '2007-2-1', | 
					
						
							|  |  |  |         '2008-4-1', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         47.524999999999999, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1960-12-19', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
											  
											
												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
										 |  |  |     [ | 
					
						
							|  |  |  |         47.52162252765670, | 
					
						
							|  |  |  |         '1960-12-19', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         48.216666666666697, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1960-12-19', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         47.556164383561601, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1960-12-19', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         47.524999999999999, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1960-12-19', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         25.558333333333302, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1982-12-7', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         0, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         25.5571892111134, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1982-12-7', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         25.9305555555556, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1982-12-7', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         2, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         25.575342465753401, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1982-12-7', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         3, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							| 
									
										
										
										
											2017-01-23 05:49:10 +00:00
										 |  |  |         25.558333333333302, | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  |         '1982-12-7', | 
					
						
							|  |  |  |         '2008-6-28', | 
					
						
							|  |  |  |         4, | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
											  
											
												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
										 |  |  |     [ | 
					
						
							|  |  |  |         0.163934426, | 
					
						
							|  |  |  |         '1960-01-01', | 
					
						
							|  |  |  |         '1960-03-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.161643836, | 
					
						
							|  |  |  |         '1961-01-01', | 
					
						
							|  |  |  |         '1961-03-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.161643836, | 
					
						
							|  |  |  |         '1963-03-01', | 
					
						
							|  |  |  |         '1963-01-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         1.086183311, | 
					
						
							|  |  |  |         '1960-01-01', | 
					
						
							|  |  |  |         '1961-02-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         1.084931507, | 
					
						
							|  |  |  |         '1961-01-01', | 
					
						
							|  |  |  |         '1962-02-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         1.083447332, | 
					
						
							|  |  |  |         '1963-01-01', | 
					
						
							|  |  |  |         '1964-02-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         1.162790698, | 
					
						
							|  |  |  |         '1963-01-01', | 
					
						
							|  |  |  |         '1964-03-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.841530055, | 
					
						
							|  |  |  |         '2020-02-28', | 
					
						
							|  |  |  |         '2021-01-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.764383562, | 
					
						
							|  |  |  |         '2020-03-28', | 
					
						
							|  |  |  |         '2021-01-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.841530055, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-03-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.838797814, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-02-29', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.838356164, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-02-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.753424658, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-01-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.753424658, | 
					
						
							|  |  |  |         '2022-04-28', | 
					
						
							|  |  |  |         '2023-01-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         1.0, | 
					
						
							|  |  |  |         '2020-01-01', | 
					
						
							|  |  |  |         '2021-01-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.99726776, | 
					
						
							|  |  |  |         '2020-02-28', | 
					
						
							|  |  |  |         '2021-02-27', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.764383562, | 
					
						
							|  |  |  |         '2020-03-28', | 
					
						
							|  |  |  |         '2021-01-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.841530055, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-03-01', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.838797814, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-02-29', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.838356164, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-02-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.753424658, | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         '2024-01-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.753424658, | 
					
						
							|  |  |  |         '2022-04-28', | 
					
						
							|  |  |  |         '2023-01-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         1.082191781, | 
					
						
							|  |  |  |         '2022-04-28', | 
					
						
							|  |  |  |         '2023-05-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         1.002739726, | 
					
						
							|  |  |  |         '2022-04-27', | 
					
						
							|  |  |  |         '2023-04-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.084699454, | 
					
						
							|  |  |  |         '2024-04-27', | 
					
						
							|  |  |  |         '2024-05-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         0.084931507, | 
					
						
							|  |  |  |         '2023-04-27', | 
					
						
							|  |  |  |         '2023-05-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         2.085766423, | 
					
						
							|  |  |  |         '2023-04-27', | 
					
						
							|  |  |  |         '2025-05-28', | 
					
						
							|  |  |  |         1, | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-16 12:00:19 +00:00
										 |  |  | ]; |