Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Date::Holidays::NZ 1.02

    Download button

    No screenshots available
    Downloads: 250  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sam Vilain | More programs
    Perl Artistic License / FREE
    October 1st, 2009, 03:21 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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.Determines

    As 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)[ 5, 4, 3 ];
     $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'};



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    New Zealand | public holiday | Perl module | determine | public | holiday

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM