Fix code style

This commit is contained in:
Adrien Crivelli 2016-10-02 15:21:52 +09:00
parent 431a1799fb
commit ae1b85f961
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
2 changed files with 8 additions and 8 deletions

View File

@ -740,13 +740,13 @@ class DateTime
$PHPEndDateObject->modify('+1 year'); $PHPEndDateObject->modify('+1 year');
// Get the result // Get the result
$retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days; $retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days;
// Adjust for leap years cases // Adjust for leap years cases
$isLeapEndYear = $PHPEndDateObject->format('L'); $isLeapEndYear = $PHPEndDateObject->format('L');
$limit = new \DateTime($PHPEndDateObject->format('Y-02-29')); $limit = new \DateTime($PHPEndDateObject->format('Y-02-29'));
if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit ) { if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) {
$retVal--; --$retVal;
} }
} }
break; break;

View File

@ -5,31 +5,31 @@ return [
'2016-01-01', '2016-01-01',
'2016-12-31', '2016-12-31',
'YD', 'YD',
365 365,
], ],
[ [
'2015-01-01', '2015-01-01',
'2015-12-31', '2015-12-31',
'YD', 'YD',
364 364,
], ],
[ [
'2015-01-01', '2015-01-01',
'2016-12-31', '2016-12-31',
'YD', 'YD',
364 364,
], ],
[ [
'2016-01-01', '2016-01-01',
'2017-12-31', '2017-12-31',
'YD', 'YD',
365 365,
], ],
[ [
'2017-01-01', '2017-01-01',
'2018-12-31', '2018-12-31',
'YD', 'YD',
364 364,
], ],
[ [
'ABC', 'ABC',