RE: [PHP] Messing with Dates
| From: | Craig Vincent | Date: | Tue, 29 Aug 2000 18:15:34 +0000 |
| Subject: | RE: [PHP] Messing with Dates | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14201@lists.php.net to get a copy of this message | ||
Whoops...messed that up..
Here's the proper code:
<?
$last = mysql_query(...);
list($hour, $min, $sec, $day, $mon, $yr) = explode(" ",date("H i s d m y"));
if (date('Y-m-d H:i:s',mktime($hour, $min, $sec, $mon-1, $day, $yr)) >
$last)
{
echo 'More than a month has passed';
}
else {
echo 'Less than a month has passed';
}
?>
Sincerely,
Craig Vincent
-------------------------
Senior Programmer
Jazzmonkey Media Inc.
http://www.jazzmonkey.com
-------------------------