note 83794 modified in function.easter-date by danbrown

From: Date: Sun, 20 Jul 2008 01:56:01 +0000
Subject: note 83794 modified in function.easter-date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141923@lists.php.net to get a copy of this message
To compute the correct Easter date for Eastern Orthodox Churches I made a function based on the Meeus Julian algorithm: <?php function orthodox_eastern($year) { $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; $de = mktime(0, 0, 0, $month, $day + 13, $year); return $de; } ?> --was-- To compute the correct Easter date for Eastern Orthodox Churches I made a function based on the Meeus Julian algorithm: function orthodox_eastern($year) { $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; $de = mktime(0, 0, 0, $month, $day + 13, $year); return $de; } http://php.net/manual/en/function.easter-date.php

« previous php.notes (#141923) next »