note 115852 deleted from function.date-diff by rasmus
| From: | rasmus@php.net | Date: | Tue, 05 May 2015 05:32:48 +0000 |
| Subject: | note 115852 deleted from function.date-diff by rasmus | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202434@lists.php.net to get a copy of this message | ||
Note Submitter: waiyanmintun at gmail dot com
----
Why PHP skip counting 1914-1-2 in 5.5.11.0?
$d1 = date_create('1914-1-1');
$d2 = date_create('1914-1-3');
$interval = date_diff($d1, $d2);
$i = (int) $interval->format('%a');
echo $i;
$i value must be 2, but show 1.
Environment : XAMPP 3.2.1 on Win 8.1