note 41657 added to function.easter-date

From: Date: Sun, 18 Apr 2004 19:37:20 +0000
Subject: note 41657 added to function.easter-date
Groups: php.notes 
Request: Send a blank email to php-notes+get-68296@lists.php.net to get a copy of this message
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; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.easter-date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41657 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41657&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41657&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68296) next »