note 51281 deleted from function.date by bobby
| From: | bobby@php.net | Date: | Thu, 07 Sep 2006 17:31:20 +0000 |
| Subject: | note 51281 deleted from function.date by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116845@lists.php.net to get a copy of this message | ||
Note Submitter: rcrodgers622 at gmail dot com
----
Regarding dolso at elastech dot it's note, it's actually easier to use the 't'
item to get the last day of any given month.
echo 'February ' . date('t',mktime(0,0,0,2,1,2004)) . ' is the last day of
February 2004';
//Displays "The February 29 is the last day of February 2004"
The actual day of the month specified in mktime() is irrelevant, but it's best and safest to
use a day that won't alter the results such as the first of the month.