Keys →
Functions ↓
function easter ($y) {#-k DST holiday#- Uses the Gauss method#- Used here for Passover, Easter, Rosh Hashanah & Yom Kippur#- Found on https://quasar.as.utexas.edu/BillInfo/ReligiousCalendars.html#-d 2/22/21 - updated calc to give correct date when $pfm landed on Sunday $y *= 1; # force to int to remove trim if ($y < 1583) $C = +3; # Julian Easter else { $H = fix($y/100,0,TRUNC); $C = fix($H/4,0,FLOOR) + fix(8*($H+11)/25,0,FLOOR) - $H; } $G = rem($y,19) + 1; # Golden number $S = rem((11*$G + $C),30); while ($S<0) $S += 30; # find when Paschal full moon falls, and delay to following Sunday if ($S == 0) $pfm = strtotime ( '4/18/'.$y ); elseif (($S == 1) && ($G >= 12)) $pfm = strtotime ( '4/17/'.$y ); else $pfm = strtotime ( '4/19/'.$y. "- $S days" ); $DoW = date ( 'w', $pfm ); # 1-Mon, 2-Tue $pfm = strtotime ( '+'.(7-$DoW).' days', $pfm); # Jump to next Sunday return $pfm; }?>