note 80664 modified in function.easter-date by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 01:56:33 +0000 |
| Subject: | note 80664 modified in function.easter-date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-141924@lists.php.net to get a copy of this message | ||
v5.2.1 - There is a known bug with easter_date() that can return incorrect dates for some years:
<?php
// 2008 OK
echo date("D d M Y", easter_date(2008)); // Sun 23 Mar 2008
// 2009 returns Saturday
echo date("D d M Y", easter_date(2009)); // Sat 11 Apr 2009
?>
However easter_days() works correctly:
<?php
echo date("D d M Y", strtotime("2009-03-21 +".easter_days(2009)."
days")); // Sun 12 Apr 2009
?>
It is apparently related to timezone settings.
--was--
v5.2.1 - There is a known bug with easter_date() that can return incorrect dates for some years:
// 2008 OK
echo date("D d M Y", easter_date(2008)); // Sun 23 Mar 2008
// 2009 returns Saturday
echo date("D d M Y", easter_date(2009)); // Sat 11 Apr 2009
However easter_days() works correctly:
echo date("D d M Y", strtotime("2009-03-21 +".easter_days(2009)."
days")); // Sun 12 Apr 2009
It is apparently related to timezone settings.
http://php.net/manual/en/function.easter-date.php