note 82066 deleted from function.getdate by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 03:04:48 +0000 |
| Subject: | note 82066 deleted from function.getdate by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142019@lists.php.net to get a copy of this message | ||
Note Submitter: Chris
----
This function by John Sherwood does the opposite:
function pastdate($t)
{
if (strtotime($t) < time())
return false;
return true;
}
When the current time has passed $t it ought to be true.
The correct answer can be given by this simple 1-liner:
function pastdate($t)
{
return (strtotime($t) < time());
}