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');
// 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;

View File

@ -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',