NAME
Date::Holidays - a holidays OOP aggregator and wrapper
SYNOPSIS
use Date::Holidays;
my $dh = Date::Holidays->new( countrycode => 'dk' );
$dh->is_holiday( year => 2004, month => 12, day => 25 );
$dh->holidays( year => 2004 );
DESCRIPTION
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.
new
This is the constructor. It takes the following parameters:
- countrycode, two letter unique code representing a country name
-
Please refer to ISO3166 (or Locale::Country)
The constructor loads the module from Date::Holidays::*, which matches the country code.
holidays
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:
is_holiday
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:
- year, four digit parameter representing year
- month, 1-12, representing month
- day, 1-31, representing day
SEE ALSO
- Date::Holidays::DE
- Date::Holidays::DK
- Date::Holidays::FR
- Date::Holidays::UK
- Date::Holiday::PT
- Date::Japanese::Holiday
- Date::Holidays::Abstract
BUGS
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
AUTHOR
Jonas B. Nielsen, (jonasbn) - <jonasbn@cpan.org>
COPYRIGHT
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).