note 111720 deleted from function.strtotime by derick
| From: | derick@php.net | Date: | Sun, 03 Nov 2013 15:16:25 +0000 |
| Subject: | note 111720 deleted from function.strtotime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197399@lists.php.net to get a copy of this message | ||
Note Submitter: aapcx55 at hotmail dot com
----
A way to obtain the numbers of days between 2 dates despite
the Dayligth Saving Time.
function datediff($date1,$date2)
{
date_default_timezone_set('GMT');
$int_nodays = floor((strtotime($date2) - strtotime($date1))/86400);
return $int_nodays + 1;
}