note 41650 added to function.cal-days-in-month
| From: | paul at rn2 dot php dot net | Date: | Sun, 18 Apr 2004 12:31:34 +0000 |
| Subject: | note 41650 added to function.cal-days-in-month | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68285@lists.php.net to get a copy of this message | ||
Here is a nifty function to return the date for easter for ranges beyond 2037 or before 1970.
<?php
function str_easter_date ($year) {
$days = easter_days ($year);
$days_in_march = cal_days_in_month (CAL_GREGORIAN, 3, $year);
if (($days + 21) < $days_in_march) {
$month = "March";
$date = $days + 21;
} else {
$month = "April";
$date = ($days + 21) - $days_in_march;
}
return "$month $date, $year";
}
?>
----
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+41650
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41650&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41650&report=yes
Search -- http://master.php.net/manage/user-notes.php