note 41657 deleted from function.easter-date by aidan
| From: | aidan@php.net | Date: | Mon, 08 Nov 2004 04:18:59 +0000 |
| Subject: | note 41657 deleted from function.easter-date by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80266@lists.php.net to get a copy of this message | ||
Note Submitter: paul at bughunt3r dot com
----
If you want to get the date of Easter for years before 1970 or after 2037 then use something like
this:
<?php
list ($month, $day) = easter_date2 (2050);
print "Easter will be on $month $day, in 2050<br>\n";
function easter_date2 ($year) {
$days = easter_days ($year);
$days_in_march = 31;
if (($days + 21) <= $days_in_march) {
$month = "march";
$day = $days + 21;
} else {
$month = "april";
$day = ($days + 21) - $days_in_march;
}
$ret[0] = $month;
$ret[1] = $day;
return $ret;
}
?>