note 69387 deleted from function.date by danbrown
| From: | danbrown@php.net | Date: | Mon, 20 Jun 2011 14:55:47 +0000 |
| Subject: | note 69387 deleted from function.date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180698@lists.php.net to get a copy of this message | ||
Note Submitter: michiel at mb-it dot nl
----
***EDITOR NOTE: Referred to note has been removed.
The calculation function of the number of days between 2 dates by zzzdobr at gmai dot com could be
done much easier:
<?php
function getdays($day1,$day2)
{
return round((strtotime($day2)-strtotime($day1))/(24*60*60),0);
}
$begin = date("Y/m/d"); // we set today as an example
$end = "2006/11/27";
getdays($begin,$end);
?>
So now all of you know how many days you have left to buy me a birthday present ;)