diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 234ef8d92..000b4d55d 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -91,27 +91,16 @@ public function calculateCleanMonday() } /** - * Calculate the Easter date for Orthodox churches. + * Orthodox Easter + * + * @param int $year + * @param string $timezone * - * @param int $year the year for which Easter needs to be calculated - * @param string $timezone the timezone in which Easter is celebrated - * - * @return \Datetime date of Orthodox Easter - * - * @link http://php.net/manual/en/function.easter-date.php#83794 - * @link https://en.wikipedia.org/wiki/Computus#Adaptation_for_Western_Easter_of_Meeus.27_Julian_algorithm + * @return \Datetime */ public function calculateEaster($year, $timezone) { - $a = $year % 4; - $b = $year % 7; - $c = $year % 19; - $d = (19 * $c + 15) % 30; - $e = (2 * $a + 4 * $b - $d + 34) % 7; - $month = floor(($d + $e + 114) / 31); - $day = (($d + $e + 114) % 31) + 1; - - return (new DateTime("$year-$month-$day", new DateTimeZone($timezone)))->add(new DateInterval('P13D')); + return $this->calculateOrthodoxEaster($year, $timezone); } /*