note 107600 deleted from function.date-diff by tularis
| From: | tularis@php.net | Date: | Tue, 21 Feb 2012 09:22:44 +0000 |
| Subject: | note 107600 deleted from function.date-diff by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-186254@lists.php.net to get a copy of this message | ||
Note Submitter: maniarpratik at gmail dot com
----
<?php
function dateDiff($start, $end) {
$start_ts = strtotime($start);
$end_ts = strtotime($end);
$diff = $end_ts - $start_ts;
return round($diff / 86400);
}
//For Example
echo "Days Different=".dateDiff("2012-02-01", "2012-02-21");
// Days Different= 20
?>