note 68874 modified in function.easter-date by danbrown

From: Date: Sun, 20 Jul 2008 01:56:52 +0000
Subject: note 68874 modified in function.easter-date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141925@lists.php.net to get a copy of this message
I made the function like this ... works fine ! <?php function ostern { $maerz21=date('z',mktime(0,0,0,3,21,$jb)); $d=((15 + $jb/100 - $jb/400 - (8 * $jb/100 + 13) / 25)%30 + 19 * ($jb%19))%30; if ($d==29) { $D=28; } elseif($d==28 && ($jb%17)>=11) { $D=27; } else $D=$d; $e=(2 * ($jb%4) + 4 *($jb%7) + 6 * $D + (6 + $jb/100 - $jb/400 - 2)%7)%7; $ostersonntag=$e+$D+1+$maerz21; return $ostersonntag; } ?> --was-- I made the function like this ... works fine ! function ostern { $maerz21=date('z',mktime(0,0,0,3,21,$jb)); $d=((15 + $jb/100 - $jb/400 - (8 * $jb/100 + 13) / 25)%30 + 19 * ($jb%19))%30; if ($d==29) { $D=28; } elseif($d==28 && ($jb%17)>=11) { $D=27; } else $D=$d; $e=(2 * ($jb%4) + 4 *($jb%7) + 6 * $D + (6 + $jb/100 - $jb/400 - 2)%7)%7; $ostersonntag=$e+$D+1+$maerz21; return $ostersonntag; } http://php.net/manual/en/function.easter-date.php

« previous php.notes (#141925) next »