1DE(3)                 User Contributed Perl Documentation                DE(3)
2
3
4

NAME

6       Date::Holidays::DE - Determine German holidays
7

SYNOPSIS

9         use Date::Holidays::DE qw(holidays);
10         my $feiertage_ref = holidays();
11         my @feiertage     = @$feiertage_ref;
12

DESCRIPTION

14       This module exports a single function named holidays() which returns a
15       list of German holidays in a given year.
16

KNOWN HOLIDAYS

18       The module knows about the following holidays:
19
20         neuj  Neujahr                     New Year's day
21         hl3k  Hl. 3 Koenige               Epiphany
22         weib  Weiberfastnacht             Fat Thursday
23         romo  Rosenmontag                 Carnival monday
24         fadi  Faschingsdienstag           Shrove tuesday
25         asmi  Aschermittwoch              Ash wednesday
26         frau  Internationaler Frauentag   International Women's day
27         grdo  Gruendonnerstag             Maundy Thursday
28         karf  Karfreitag                  Good friday
29         kars  Karsamstag                  Holy Saturday
30         osts  Ostersonntag                Easter sunday
31         ostm  Ostermontag                 Easter monday
32         pfis  Pfingstsonntag              Whit sunday
33         pfim  Pfingstmontag               Whit monday
34         himm  Himmelfahrtstag             Ascension day
35         fron  Fronleichnam                Corpus christi
36         1mai  Maifeiertag                 Labor day, German style
37         17ju  Tag der deutschen Einheit   Reunion day (>= 1954, <= 1990)
38         frie  Augsburger Friedensfest     Augsburg peace day
39         mari  Mariae Himmelfahrt          Assumption day
40         kind  Weltkindertag               International Childrens Day
41         3okt  Tag der deutschen Einheit   Reunion day (>= 1990)
42         refo  Reformationstag             Reformation day
43         alhe  Allerheiligen               All hallows day
44         buss  Buss- und Bettag            Penance day
45         votr  Volkstrauertag              Remembrance Day, German Style
46         toso  Totensonntag                Sunday in commemoration of the dead
47         adv1  1. Advent                   1st sunday in advent
48         adv2  2. Advent                   2nd sunday in advent
49         adv3  3. Advent                   3rd sunday in advent
50         adv4  4. Advent                   4th sunday in advent
51         heil  Heiligabend                 Christmas eve
52         wei1  1. Weihnachtstag            Christmas
53         wei2  2. Weihnachtstag            Christmas
54         silv  Silvester                   New year's eve
55
56       Please refer to the module source for detailed information about how
57       every holiday is calculated. Too much detail would be far beyond the
58       scope of this document, but it's not particularly hard once you've
59       found the date for Easter.
60

USAGE

62   OUTPUT FORMAT
63       The list returned by holidays() consists of UNIX-Style timestamps in
64       seconds since The Epoch. You may pass a strftime() style format string
65       to get the dates in any format you desire:
66
67         my $feiertage_ref = holidays(FORMAT=>"%d.%m.%Y");
68
69       Here are a few examples to get you started:
70
71         FORMAT=>"%d.%m.%Y"              25.12.2001
72         FORMAT=>"%Y%m%d"                20011225
73         FORMAT=>"%a, %B %d"             Tuesday, December 25
74
75       Please consult the manual page of strftime() for a complete list of
76       available format definitions.
77
78       There is, however, one "proprietary" extension to the formats of
79       strftime(): The format definition %# will print the internal
80       abbreviation used for each holiday.
81
82         FORMAT=>"%#:%d.%m"              wei1:25.12.
83
84       As the module doesn't want to deal with i18n issues, you'll have to
85       find your own way to translate the aliases into your local language.
86       See the example/feiertage.pl script included in the distribution to get
87       the idea. This was added in version 0.6.
88
89   LOCAL HOLIDAYS
90       The module also knows about different regulations throughout Germany.
91
92       When calling holidays(), the resulting list by default contains the
93       list of Germany-wide holidays.
94
95       You can specify one ore more of the following federal states to get the
96       list of holidays local to that state:
97
98         bw  Baden-Wuerttemberg
99         by  Freistaat Bayern
100         be  Berlin
101         bb  Brandenburg
102         hb  Freie Hansestadt Bremen
103         hh  Freie und Hansestadt Hamburg
104         he  Hessen
105         mv  Mecklenburg-Vorpommern
106         ni  Niedersachsen
107         nw  Nordrhein-Westfalen
108         rp  Rheinland-Pfalz
109         sl  Saarland
110         sn  Freistaat Sachsen
111         st  Sachsen-Anhalt
112         sh  Schleswig-Holstein
113         th  Freistaat Thueringen
114
115       For example,
116
117         my $feiertage_ref = holidays(WHERE=>['by', 'bw']);
118
119       returns the list of holidays local to Bayern or Baden-Wuerttemberg.
120
121       To get the list of local holidays along with the default list of common
122       German holidays, use the following:
123
124         my $feiertage_ref = holidays(WHERE=>['common', 'bw']);
125
126       returns the list of common German holidays merged with the list of
127       holidays specific to Baden-Wuerttemberg.
128
129       You can also request a list containing all holidays this module knows
130       about:
131
132         my $feiertage_ref = holidays(WHERE=>['all']);
133
134       will return a list of all known holidays. This was added in version
135       0.6.
136
137   ADDITIONAL HOLIDAYS
138       There are a number of holidays that aren't really holidays, e.g. New
139       Year's Eve and Christmas Eve. These aren't contained in the common set
140       of holidays returned by the holidays() function. The aforementioned
141       silv and heil are probably the most likely ones that you'll need. If
142       you live in Koeln, you'll probably want to include romo and fadi, too.
143       ;-)
144
145       As if things weren't bad enough already, there even are Holidays that
146       aren't valid in an entire state. This refers to fron, alhe and mari in
147       particular.
148
149       If you want one or several of them to appear in the output from
150       holidays(), use the following:
151
152         my $feiertage_ref = holidays(ADD=>['heil', 'silv']);
153
154   SPECIFYING THE YEAR
155       By default, holidays() returns the holidays for the current year.
156       Specify a year as follows:
157
158         my $feiertage_ref = holidays(YEAR=>2004);
159
160   HOLIDAYS ON WEEKENDS
161       By default, holidays() includes Holidays that occur on weekends in its
162       listing.
163
164       To disable this behaviour, set the WEEKENDS option to 0:
165
166         my $feiertage_ref = holidays(WEEKENDS=>0);
167

COMPLETE EXAMPLE

169       Get all holidays for Germany and Bayern in 2004, count New Year's Eve
170       and Christmas Eve as Holidays. Also, we live in a catholic region where
171       Assumption day is a holiday, too. Exclude weekends and return the date
172       list in human readable format:
173
174         my $feiertage_ref = holidays( WHERE    => ['common', 'he'],
175                                       FORMAT   => "%a, %d.%m.%Y",
176                                       WEEKENDS => 0,
177                                       YEAR     => 2004,
178                                       ADD      => ['heil', 'silv', 'mari']);
179

PREREQUISITES

181       Uses Date::Calc 5.0 for all calculations. Makes use of the POSIX and
182       Time::Local modules from the standard Perl distribution.
183

BUGS & SUGGESTIONS

185       If you run into a miscalculation, need some sort of feature or an
186       additional holiday, or if you know of any new changes to our funky
187       holiday situation, please drop the author a note.
188
189       Patches are welcome. If you can, please fork the project on github to
190       submit your change:
191
192         http://github.com/mschmitt/Date-Holidays-DE
193
194       Tag der Deutschen Einheit was moved from June 17th to October 3rd in
195       1990 and is therefore listed twice when calculating holidays for 1990.
196       This is not a bug. Awareness for this was introduced in Version 1.1.
197

OFFICIAL HOLIDAY INFORMATION

199       The German Federal Ministry of the Interior used to publish a
200       comprehensive list of holiday dates. This does currently not appear to
201       be the case.
202

LIMITATIONS

204       Date::Calc works with year, month and day numbers exclusively. Even
205       though this module uses Date::Calc for all calculations, it represents
206       the calculated holidays as UNIX timestamps (seconds since The Epoch) to
207       allow for more flexible formatting. On Perl versions earlier than
208       5.12.0 (released 2010), this limits the range of years to work on to
209       the years from 1972 to 2037.
210
211       Historic regulations for Buss- und Bettag are still not implemented.
212
213       Date::Holidays::DE is not configurable. Holiday changes don't come over
214       night and a new module release can be rolled out within a single day.
215

AUTHOR

217       Martin Schmitt <mas at scsy dot de>
218

SEE ALSO

220       perl, Date::Calc.
221
222
223
224perl v5.30.0                      2019-10-02                             DE(3)
Impressum