Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/david-dick/date-holidays-au
Determine Australian Public Holidays
https://github.com/david-dick/date-holidays-au
australia calculate-holidays perl perl-module perl5 perl5-module public-holidays
Last synced: about 1 month ago
JSON representation
Determine Australian Public Holidays
- Host: GitHub
- URL: https://github.com/david-dick/date-holidays-au
- Owner: david-dick
- Created: 2021-01-01T02:53:32.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-20T10:12:59.000Z (11 months ago)
- Last Synced: 2024-01-20T11:24:01.254Z (11 months ago)
- Topics: australia, calculate-holidays, perl, perl-module, perl5, perl5-module, public-holidays
- Language: Perl
- Homepage: https://metacpan.org/dist/Date-Holidays-AU
- Size: 53.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Date::Holidays::AU - Determine Australian Public Holidays
VERSION
Version 0.32
SYNOPSIS
use Date::Holidays::AU qw( is_holiday );
my ($year, $month, $day) = (localtime)[ 5, 4, 3 ];
$year += 1900;
$month += 1;
my $state = 'VIC';
print "Excellent\n" if is_holiday( $year, $month, $day, $state );DESCRIPTION
This module makes an attempt at describing Australian holidays using
the interface defined Date::Holidays::Abstract, which defines two
methods, is_holiday and holidays.SUBROUTINES/METHODS
is_holiday($year, $month, $day, $state, $params)
returns true or false depending to whether or not the date in
question is a holiday according to the state and the additional
parameters.holidays(year => $year, state => $state, %params)
Returns a hashref of all defined holidays in the year according to
the state and the additional parameters. Keys in the hashref are in
'mmdd' format, the values are the names of the holidays.The states must be one of the allowed ISO 3166-2:AU
codes;
'VIC','WA','NT','QLD','TAS','NSW','SA' or 'ACT'. The default state is
'VIC'. The following tables lists the allowable parameters for each
state;State Parameter Default Values
VIC no_melbourne_cup 0 1 | 0
NT region 'Darwin' 'Alice Springs' | 'Tennant Creek' | 'Katherine' | 'Darwin' | 'Borrolooda'
QLD no_show_day 0 1 | 0
NSW include_bank_holiday 0 1 | 0
ACT include_bank_holiday 0 1 | 0
TAS holidays [] 'Devonport Cup','King Island Show','Launceston Cup','Hobart Show','Recreation Day','Burnie Show','Agfest','Launceston Show','Flinders Island Show'DEPENDENCIES
Uses Date::Easter for easter calculations. Makes use of the Time::Local
modules from the standard Perl distribution.CONFIGURATION AND ENVIRONMENT
Date::Holidays::AU requires no configuration files or environment
variables.INCOMPATIBILITIES
None reported
AUTHOR
David Dick
BUGS AND LIMITATIONS
Support for WA's Queen's Birthday holiday only consists of hard-coded
values. Likewise for Grand Final Eve in Victoria.LICENSE AND COPYRIGHT
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.SEE ALSO
Date::Holidays::Abstract, Date::Holiday::DE, Date::Holiday::UK