note 51281 added to function.date
| From: | rcrodgers622 at gmail dot com | Date: | Fri, 25 Mar 2005 18:08:25 +0000 |
| Subject: | note 51281 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86986@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51281
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51281&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51281&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51281&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51281&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51281&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51281&report=yes
Search -- http://master.php.net/manage/user-notes.php