note 105198 deleted from function.date-diff by danbrown
| From: | danbrown@php.net | Date: | Tue, 02 Aug 2011 16:11:45 +0000 |
| Subject: | note 105198 deleted from function.date-diff by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182112@lists.php.net to get a copy of this message | ||
Note Submitter: toledoroy at hotmail dot com
----
Simple Function:
function dateDiff($from, $to = "now")
{
return round((strtotime($to) - strtotime($from))/60/60/24);
}
More here:
http://phpdeveloperblog.blogspot.com/2011/07/calculate-time-diff-and-calculate-age.html