note 54364 added to function.cal-days-in-month
| From: | php-general at lists dot php dot net | Date: | Fri, 01 Jul 2005 13:27:18 +0000 |
| Subject: | note 54364 added to function.cal-days-in-month | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91262@lists.php.net to get a copy of this message | ||
Correct replacement for cal_days_in_month is this:
<?
$daynum = date("t",strtotime("$year-$month-01"));
?>
Note for editor: date("j") returns current day number, not maximum day number in given
month. Editor, please remove the post with date("j") and add this one with
date("t")
----
Manual Page -- http://www.php.net/manual/en/function.cal-days-in-month.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54364
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54364&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54364&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54364&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54364&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54364&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54364&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54364&report=yes
Search -- http://master.php.net/manage/user-notes.php