<?php
/* $Id: holidays.nz.inc.php,v 1.2 2003/10/02 16:56:05 k-fish Exp $ */

if (date("dm", $date) == "0101") $holiday = Lang::getLanguageString("newyear");	
elseif (date("dm", $date) == "0102") $holiday = Lang::getLanguageString("newyearholiday");
elseif (date("dm", $date) == "0205") $holiday = Lang::getLanguageString("waitangiday");		
elseif (date("dm", $date) == "2504") $holiday = Lang::getLanguageString("anzacday");	
elseif (date("dm", $date) == "2512") $holiday = Lang::getLanguageString("christmasday");
elseif (date("dm", $date) == "2612") $holiday = Lang::getLanguageString("boxingday");
else {
    // queens birthday (first Monday in June)
    $fjun = date("w", mktime( 0, 0, 0, 6, 1, $tmp["year"]));
    if ($fjun > 1) $qbd = mktime( 0, 0, 0, 6, 1, $tmp["year"]) + (8 - $fjun) * 3600 * 24;
    elseif ($fjun == 0) $qbd = mktime( 0, 0, 0, 6, 1, $tmp["year"]) +  3600 * 24;
    else $qbd = mktime( 0, 0, 0, 6, 1, $tmp["year"]);
   
    // labour day (last Monday in October)
    $foct = date("w", mktime( 0, 0, 0, 10, 31, $tmp["year"]));
    if ($foct == 0) $foct = 7;
    $labd = mktime( 0, 0, 0, 5, 31, $tmp["year"]) - ($foct - 1) * 3600 * 24;

    if (date("dmY", $date) == date("dmY", $easter-3600*24*2 )) 	$holiday = Lang::getLanguageString("easterfriday");
    elseif (date("dmY", $date) == date("dmY", $easter)) 	        $holiday = Lang::getLanguageString("eastersunday");
    elseif (date("dmY", $date) == date("dmY", $easter+3600*24   )) $holiday = Lang::getLanguageString("eastermonday"); 
    elseif (date("dmY", $date) == date("dmY", $qbd)) 		$holiday = Lang::getLanguageString("queensbirthday"); 
    elseif (date("dmY", $date) == date("dmY", $labd)) 		$holiday = Lang::getLanguageString("labourday"); 
    else $holiday = "";
}	
?>