Date-Calc
view release on metacpan or search on metacpan
lib/Date/Calendar/Profiles.pm view on Meta::CPAN
$Profiles->{'NO'} = # Norway
{
"Nyttårsdag" => "01/01",
"Onsdag før Skjærtorsdag" => "#-4", # sometimes half a day off
"Skjærtorsdag" => "-3",
"Langfredag" => "-2",
"Påskedag" => "+0",
"2. Påskedag" => "+1",
"1. mai" => "05/01",
"Grunnlovsdag" => "05/17",
"Kristi himmelfartsdag" => "+39",
"Pinsedag" => "+49",
"2. Pinsedag" => "+50",
"Julaften" => "#12/24", # sometimes half a day off
"Juledag" => "12/25",
"2. Juledag" => "12/26",
"Nyttårsaften" => "#31.12" # sometimes half a day off
};
## Thanks to:
## Sercan Uslu <sercanuslu@su.sabanciuniv.edu>
#
#$Profiles->{'TR'} = # Türkiye
#{
## National Public Holidays (fixed):
#
# "New Year's Day" => "01-01",
# "National Sovereignty Day" => "23-04",
# "Children's Day" => "23-04",
# "Atatürk Commemoration" => "19-05",
# "Youth and Sports Day" => "19-05",
# "Victory Day" => "30-08",
# "Republic Day" => "29-10",
#
## Religious Public Holidays (moving):
#
# "Kurban Bayram (Eid al Adha) 1" => "22-02", # only valid in 2002
# "Kurban Bayram (Eid al Adha) 2" => "23-02", # only valid in 2002
# "Kurban Bayram (Eid al Adha) 3" => "24-02", # only valid in 2002
# "Kurban Bayram (Eid al Adha) 4" => "25-02", # only valid in 2002
#
# "Ramazan / Seker Bayram (Eid al Fitr) 1" => "05-12", # only valid in 2002
# "Ramazan / Seker Bayram (Eid al Fitr) 2" => "06-12", # only valid in 2002
# "Ramazan / Seker Bayram (Eid al Fitr) 3" => "07-12" # only valid in 2002
#};
# Thanks to:
# Jonathan Stowe <gellyfish@gellyfish.com>
$Profiles->{'GB'} = # Great Britain
{
"New Year's Day" => \&GB_New_Year,
"Good Friday" => "-2",
"Easter Sunday" => "+0",
"Easter Monday" => "+1",
"Early May Bank Holiday" => \&GB_Early_May,
"Late May Bank Holiday" => "5/Mon/May", # Last Monday
#
# Jonathan Stowe <gellyfish@gellyfish.com> told me that spring
# bank holiday is the first Monday after Whitsun, but my pocket
# calendar suggests otherwise. I decided to follow my pocket
# guide and an educated guess ;-), but please correct me if
# I'm wrong!
#
"Summer Bank Holiday" => "5/Mon/Aug", # Last Monday
"Christmas Day" => \&GB_Christmas,
"Boxing Day" => \&GB_Boxing
};
sub GB_New_Year
{
my($year,$label) = @_;
return( &Next_Monday($year,1,1) );
}
#
# The following formula (also from Jonathan Stowe <gellyfish@gellyfish.com>)
# also contradicts my pocket calendar, but for lack of a better guess I
# left it as it is. Please tell me the correct formula in case this one
# is wrong! Thank you!
#
sub GB_Early_May # May bank holiday is the first Monday after May 1st
{
my($year,$label) = @_;
if (Day_of_Week($year,5,1) == 1)
{ return( Nth_Weekday_of_Month_Year($year,5,1,2) ); }
else
{ return( Nth_Weekday_of_Month_Year($year,5,1,1) ); }
}
sub GB_Christmas
{
my($year,$label) = @_;
return( &Next_Monday($year,12,25) );
}
sub GB_Boxing
{
my($year,$label) = @_;
return( &Next_Monday_or_Tuesday($year,12,26) );
}
# Thanks to:
# Bianca Taylor <bianca@unisolve.com.au>
# Andie Posey <andie@posey.org>
# Don Simonetta <don.simonetta@tequinox.com>
# Paul Fenwick <pjf@cpan.org>
# Brian Graham <brian.graham@nec.com.au>
# Pat Waters <pat.waters@dir.qld.gov.au>
# Stephen Riehm <Stephen.Riehm@gmx.net>
# http://www.holidayfestival.com/Australia.html
# http://www.earthcalendar.net/countries/2001/australia.html
# Sven Geisler <sgeisler@aeccom.com>
# Canberra (ACT):
# http://www.workcover.act.gov.au/labourreg/publicholidays.html
# New South Wales (NSW):
# http://www.dir.nsw.gov.au/holidays/index.html
# Northern Territory (NT):
# http://www.nt.gov.au/ocpe/documents/public-holidays/
# Queensland (QLD):
# http://www.wageline.qld.gov.au/publicholidays/list_pubhols.html
# South Australia (SA):
# http://www.sacentral.sa.gov.au/information/pubhols.htm
# Tasmania (TAS):
# http://www.workcover.tas.gov.au/WSTPublish/node/wststatutory.htm
# Victoria (VIC):
# http://www.info.vic.gov.au/resources/publichols.htm
# Western Australia (WA):
# http://www.doplar.wa.gov.au/wages/pub_hol1.htm
$Profiles->{'AU'} = # Australia
{
"Australia Day" => \&AU_Australia,
"St. Valentine's Day" => "#14.02.",
"Good Friday" => "-2",
"Easter Sunday" => "+0",
"Easter Monday" => "+1",
"Anzac Day" => "25.04.",
"Christmas Day" => \&AU_Christmas,
"Boxing Day" => \&AU_Boxing
};
sub AU_Australia
{
my($year,$label) = @_;
return( &Next_Monday($year,1,26) );
}
sub AU_Christmas
{
my($year,$label) = @_;
return( &Next_Monday($year,12,25) );
}
sub AU_Boxing
{
my($year,$label) = @_;
return( &Next_Monday_or_Tuesday($year,12,26) );
}
sub AU_New_Year
{
my($year,$label) = @_;
return( &Next_Monday($year,1,1) );
}
sub AU_Lauceston
{
my($year,$label) = @_;
if (Nth_Weekday_of_Month_Year($year,2,3,5))
{ return( Nth_Weekday_of_Month_Year($year,2,3,4) ); }
else
{ return( Nth_Weekday_of_Month_Year($year,2,3,3) ); }
}
sub AU_May
{
( run in 0.616 second using v1.01-cache-2.11-cpan-99c4e6809bf )