note 50020 deleted from function.date by tularis

From: Date: Thu, 09 Feb 2012 21:07:49 +0000
Subject: note 50020 deleted from function.date by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-186042@lists.php.net to get a copy of this message
Note Submitter: jon AT standardise DOT us ---- Don't forget that months start on the 1st day, and not a zero date. Might seem obvious but: <?php $test = date("F Y", mktime(0, 0, 0, 12, 0, 2005)); ?> Will return November 2005, not December. <?php $test = date("F Y", mktime(0, 0, 0, 12, 1, 2005)); ?> The 1st is needed to get the right month.

« previous php.notes (#186042) next »