note 94699 deleted from function.strtotime by danbrown

From: Date: Thu, 19 Nov 2009 16:21:17 +0000
Subject: note 94699 deleted from function.strtotime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163079@lists.php.net to get a copy of this message
Note Submitter: Josh ---- Any ideas on how one would query to see if a date is within the last two weeks and if so echo "new". i was thinking something like... //Set date variable $date = strtotime("now"); // Now check if older than two weeks if ((float)$date > (float)strtotime("-2 weeks")) echo "New"; are there better ways to do this? thanks for your help.

« previous php.notes (#163079) next »