Keys →
Functions ↓
function DSTbrazil ( $y ) {#-k DST#- Return the appropriate DST rule for Brazil for the year$DSTrules = Array ( 'Rulea' => 'third Sunday February', 'Ruleb' => 'fourth Sunday February' ); $easter = easter_date($y); $carn = $easter - 46*SecsPerDay; $a = strtotime($DSTrules['Rulea'] . ' ' . $y ); $b = strtotime($DSTrules['Ruleb'] . ' ' . $y ); if (($a <= $carn) && (($a+7*SecsPerDay) > $carn)) return $b; # falls w/in carnaval else return $a; }?>