NAME
Date::Holidays::USA - Provides United States of America holidays
VERSION
version 0.0202
SYNOPSIS
# Using with the Date::Holidays module:
use Date::Holidays ();
my $dh = Date::Holidays->new(countrycode => 'USA', nocheck => 1);
print $dh->is_holiday(year => 2024, month => 1, day => 1), "\n";
my $h = $dh->holidays;
# Using the Date::Holidays::USA module directly:
use Date::Holidays::USA ();
$dh = Date::Holidays::USA->new;
print $dh->is_holiday(2024, 1, 1), "\n";
$h = $dh->holidays;
$h = $dh->us_holidays(2032);
DESCRIPTION
Date::Holidays::USA
provides United States of America holidays.
METHODS
new
$dh = Date::Holidays::USA->new;
Return a new Date::Holidays::USA
object.
is_holiday
$holiday = is_holiday($year, $month, $day);
Takes three arguments:
year: four digits
month: between 1-12
day: between 1-31
Returns the name of the holiday, if one exists on that day.
us_holidays
$holidays = us_holidays;
$holidays = us_holidays($year);
Returns a hash reference of holiday names, where the keys are by month and day.
holidays
$holidays = holidays;
$holidays = holidays($year);
Returns a hash reference of holiday names, where the keys are 4 digit strings month and day.
SEE ALSO
AUTHOR
Gene Boggs <gene@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2024 by Gene Boggs.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)