Fix code style
This commit is contained in:
parent
431a1799fb
commit
ae1b85f961
|
@ -740,13 +740,13 @@ class DateTime
|
|||
$PHPEndDateObject->modify('+1 year');
|
||||
|
||||
// Get the result
|
||||
$retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days;
|
||||
$retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days;
|
||||
|
||||
// Adjust for leap years cases
|
||||
$isLeapEndYear = $PHPEndDateObject->format('L');
|
||||
$limit = new \DateTime($PHPEndDateObject->format('Y-02-29'));
|
||||
if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit ) {
|
||||
$retVal--;
|
||||
if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) {
|
||||
--$retVal;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -5,31 +5,31 @@ return [
|
|||
'2016-01-01',
|
||||
'2016-12-31',
|
||||
'YD',
|
||||
365
|
||||
365,
|
||||
],
|
||||
[
|
||||
'2015-01-01',
|
||||
'2015-12-31',
|
||||
'YD',
|
||||
364
|
||||
364,
|
||||
],
|
||||
[
|
||||
'2015-01-01',
|
||||
'2016-12-31',
|
||||
'YD',
|
||||
364
|
||||
364,
|
||||
],
|
||||
[
|
||||
'2016-01-01',
|
||||
'2017-12-31',
|
||||
'YD',
|
||||
365
|
||||
365,
|
||||
],
|
||||
[
|
||||
'2017-01-01',
|
||||
'2018-12-31',
|
||||
'YD',
|
||||
364
|
||||
364,
|
||||
],
|
||||
[
|
||||
'ABC',
|
||||
|
|
Loading…
Reference in New Issue