Date::Holidays::NZ

Determine New Zealand public holidays
Download

Date::Holidays::NZ Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sam Vilain
  • Publisher web site:
  • http://search.cpan.org/~samv/

Date::Holidays::NZ Tags


Date::Holidays::NZ Description

Determine New Zealand public holidays Date::Holidays::NZ is a Perl module that determines whether a given date is a New Zealand public holiday or not.DeterminesAs described at http://www.ers.dol.govt.nz/holidays_act_2003/dates/, the system of determining holidays in New Zealand is a complicated matter. Not only do you need to know what region the country is living in to figure out the relevant Anniversary Day, but sometimes the district too (for the West Coast and Canterbury). As regions are free to pick the actual days observed for particular holidays, this module cannot guarantee dates past the last time it was checked against the Employment Relations Service web site (currently returns known good values for statutory holidays 2003 - 2009 and regional holidays for 2005).This module hopes to return values that are Mostly Right(tm) when passed in census 2001 region codes (widely used throughout government and industry), and can also be passed in textual region labels, which includes the appropriate Anniversary Day.Also, there is a difference between what is considered a holiday by the Holidays Act 2003 - and hence entitling a person to time in lieu and/or extra pay - and what is considered to be a Bank Holiday. This module returns Bank Holiday dates, so if Christmas Day falls on a Sunday, the 26th will be called "Boxing Day", and the 27th "Christmas Day Holiday".SYNOPSIS use Date::Holidays::NZ; my ($year, $month, $day) = (localtime); $year += 1900; $month += 1; print "Woohoo" if is_nz_holiday( $year, $month, $day ); # supply Census 2001 region codes (1-19), or names like # "Wellington", "Canterbury (South)", etc print "Yes!" if is_nz_holiday( $year, $month, $day, $region ); my $h = nz_holidays($year); printf "Dec. 25th is named '%s' ", $h->{'1225'}; Requirements: · Perl


Date::Holidays::NZ Related Software