note 38954 added to function.cal-days-in-month
| From: | saish at rn2 dot php dot net | Date: | Tue, 13 Jan 2004 09:30:36 +0000 |
| Subject: | note 38954 added to function.cal-days-in-month | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63398@lists.php.net to get a copy of this message | ||
heres the function to add the 100 and 400 year correction to
David Bindel's fantastic function :
function days_in_month($month, $year)
{
// calculate number of days in a month
return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : ($month % 7 %
2 ? 31 : 30);
}
----
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+38954
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38954&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38954&report=yes
Search -- http://master.php.net/manage/user-notes.php