note 52392 added to function.date
| From: | llewellyntd at gmail dot com | Date: | Fri, 29 Apr 2005 12:50:30 +0000 |
| Subject: | note 52392 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88747@lists.php.net to get a copy of this message | ||
Here is a very easy way to get the difference, in days, between two dates:
$days = (strtotime("2005-12-31") - strtotime(date("Y-m-d"))) / (60 * 60 * 24);
print $days;
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52392
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52392&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52392&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52392&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52392&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52392&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52392&report=yes
Search -- http://master.php.net/manage/user-notes.php