note 76953 deleted from function.date by bobby

From: Date: Tue, 07 Aug 2007 22:25:40 +0000
Subject: note 76953 deleted from function.date by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-129265@lists.php.net to get a copy of this message
Note Submitter: kwall50 ---- Does anyone else get ridiculous dates if they use the example for tomorrow above in an effort to subtract a day Current example above: <?php $tomorrow = date("Y"-"m"-"d",mktime(0,0,0,date("Y"),date("d")+1,date("m"))); If you are looking for yesterdays date, I suggest adding the other date variables instead of zero's in mktime, for example: $yesterday = date("Y"-"m"-"d",mktime(date("h"), date("I"),date("s"),date("m"),date("d")+1,date("Y"))); ?>

« previous php.notes (#129265) next »