Allow start and end date of DATEDIF function to be the same

This commit is contained in:
mattkibbler 2015-08-17 18:48:58 +01:00 committed by Adrien Crivelli
parent a7155d8890
commit 62345ef4da
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
2 changed files with 7 additions and 1 deletions

View File

@ -664,7 +664,7 @@ class DateTime
}
// Validate parameters
if ($startDate >= $endDate) {
if ($startDate > $endDate) {
return Functions::NAN();
}

View File

@ -607,4 +607,10 @@ return [
'Y',
50,
],
[
'1982-12-07',
'1982-12-7',
'D',
0,
],
];