Date::Holidays - a holidays OOP aggregator and wrapper
use Date::Holidays;
my $dh = Date::Holidays->new( countrycode => 'dk' );
$dh->is_holiday( year => 2004, month => 12, day => 25 );
$dh->holidays( year => 2004 );
These are the methods implemented in this class. They act as wrappers around the different modules implementing different national holidays, and at the same time they provide an OOP interface.
As described below is requires that a certain API is implemented (SEE: holidays and is_holiday below).
If you are an author who wants to comply to this suggestion, either look at some of the other modules in the Date::Holidays::* namespace and Date::Holidays::Abstract - or write me.
This is the constructor. It takes the following parameters:
Please refer to ISO3166 (or Locale::Country)
The constructor loads the module from Date::Holidays::*, which matches the country code.
This is a wrapper around the loaded module's holidays method if this is implemented. If this method is not implemented it trues <countrycode>_holidays.
Takes one argument:
This is yet another wrapper around the loaded module's is_holiday method if this is implemented. Also if this method is not implemented it tries is_<countrycode>_holiday.
Takes 3 arguments:
Please report issues via CPAN RT:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Date-Holidays
or by sending mail to
bug-Date-Holidays@rt.cpan.org
Jonas B. Nielsen, (jonasbn) - <jonasbn@cpan.org>
Date-Holidays is (C) by Jonas B. Nielsen, (jonasbn) 2004
Date-Holidays is released under the artistic license
The distribution is licensed under the Artistic License, as specified by the Artistic file in the standard perl distribution (http://www.perl.com/language/misc/Artistic.html).
To install Date::Holidays, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Date::Holidays
CPAN shell
perl -MCPAN -e shell install Date::Holidays
For more information on module installation, please visit the detailed CPAN module installation guide.