Calendar::Indonesia::Holiday is a Perl module that provides functions to list Indonesian holidays.
This module uses Log::Any logging framework.
This module's functions has Sub::Spec specs.
SYNOPSIS
use Calendar::Indonesia::Holiday qw(
list_id_holidays
enum_id_workdays
count_id_workdays
);
# list Indonesian holidays for the year 2011, without the joint leave days
# ("cuti bersama"), show only the dates
my $res = list_id_holidays(year => 2011, is_joint_leave=>0);
# sample result
[200, "OK", [
'2011-01-01',
'2011-02-03',
'2011-02-16',
'2011-03-05',
'2011-04-22',
'2011-05-17',
'2011-06-02',
'2011-06-29',
'2011-08-17',
'2011-08-31',
'2011-09-01',
'2011-11-07',
'2011-11-27',
'2011-12-25',
]];
# list religious Indonesian holidays, show full details
my $res = list_id_holidays(year => 2011,
has_tags => ['religious'], detail=>1);
# sample result
[200, "OK", [
{date => '2011-02-16',
day => 16,
month => 2,
year => 2011,
id_name => 'Maulid Nabi Muhammad',
en_name => 'Mawlid',
en_aliases => ['Mawlid An-Nabi'],
id_aliases => ['Maulud'],
is_holiday => 1,
tags => [qw/religious religion=islam calendar=lunar/],
},
...
]];
# check whether 2011-02-16 is a holiday
my $res = list_id_holidays(date => '2011-02-16');
print "2011-02-16 is a holiday\n" if @{$res->[2]};
# enumerate working days for a certain period
my $res = enum_id_workdays(year=>2011, month=>7);
# idem, but returns a number instead. year/month defaults to current
# year/month.
my $res = count_id_workdays();
Product's homepage
Requirements:
· Perl