.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DE 3pm" .TH DE 3pm "2023-02-18" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Date::Holidays::DE \- Determine German holidays .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Date::Holidays::DE qw(holidays); \& my $feiertage_ref = holidays(); \& my @feiertage = @$feiertage_ref; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module exports a single function named \fB\fBholidays()\fB\fR which returns a list of German holidays in a given year. .SH "KNOWN HOLIDAYS" .IX Header "KNOWN HOLIDAYS" The module knows about the following holidays: .PP .Vb 10 \& neuj Neujahr New Year\*(Aqs day \& hl3k Hl. 3 Koenige Epiphany \& weib Weiberfastnacht Fat Thursday \& romo Rosenmontag Carnival monday \& fadi Faschingsdienstag Shrove tuesday \& asmi Aschermittwoch Ash wednesday \& frau Internationaler Frauentag International Women\*(Aqs day \& befr Tag der Befreiung Liberation day \& grdo Gruendonnerstag Maundy Thursday \& karf Karfreitag Good friday \& kars Karsamstag Holy Saturday \& osts Ostersonntag Easter sunday \& ostm Ostermontag Easter monday \& pfis Pfingstsonntag Whit sunday \& pfim Pfingstmontag Whit monday \& himm Himmelfahrtstag Ascension day \& fron Fronleichnam Corpus christi \& 1mai Maifeiertag Labor day, German style \& 17ju Tag der deutschen Einheit Reunion day (>= 1954, <= 1990) \& frie Augsburger Friedensfest Augsburg peace day \& mari Mariae Himmelfahrt Assumption day \& kind Weltkindertag International Childrens Day \& 3okt Tag der deutschen Einheit Reunion day (>= 1990) \& refo Reformationstag Reformation day \& alhe Allerheiligen All hallows day \& buss Buss\- und Bettag Penance day \& votr Volkstrauertag Remembrance Day, German Style \& toso Totensonntag Sunday in commemoration of the dead \& adv1 1. Advent 1st sunday in advent \& adv2 2. Advent 2nd sunday in advent \& adv3 3. Advent 3rd sunday in advent \& adv4 4. Advent 4th sunday in advent \& heil Heiligabend Christmas eve \& wei1 1. Weihnachtstag Christmas \& wei2 2. Weihnachtstag Christmas \& silv Silvester New year\*(Aqs eve .Ve .PP Please refer to the module source for detailed information about how every holiday is calculated. Too much detail would be far beyond the scope of this document, but it's not particularly hard once you've found the date for Easter. .SH "USAGE" .IX Header "USAGE" .SS "\s-1OUTPUT FORMAT\s0" .IX Subsection "OUTPUT FORMAT" The list returned by \fB\fBholidays()\fB\fR consists of UNIX-Style timestamps in seconds since The Epoch. You may pass a \fB\fBstrftime()\fB\fR style format string to get the dates in any format you desire: .PP .Vb 1 \& my $feiertage_ref = holidays(FORMAT=>"%d.%m.%Y"); .Ve .PP Here are a few examples to get you started: .PP .Vb 3 \& FORMAT=>"%d.%m.%Y" 25.12.2001 \& FORMAT=>"%Y%m%d" 20011225 \& FORMAT=>"%a, %B %d" Tuesday, December 25 .Ve .PP Please consult the manual page of \fB\fBstrftime()\fB\fR for a complete list of available format definitions. .PP There is, however, one \*(L"proprietary\*(R" extension to the formats of \fB\fBstrftime()\fB\fR: The format definition \fI%#\fR will print the internal abbreviation used for each holiday. .PP .Vb 1 \& FORMAT=>"%#:%d.%m" wei1:25.12. .Ve .PP As the module doesn't want to deal with i18n issues, you'll have to find your own way to translate the aliases into your local language. See the \fIexample/feiertage.pl\fR script included in the distribution to get the idea. This was added in version 0.6. .SS "\s-1LOCAL HOLIDAYS\s0" .IX Subsection "LOCAL HOLIDAYS" The module also knows about different regulations throughout Germany. .PP When calling \fB\fBholidays()\fB\fR, the resulting list by default contains the list of Germany-wide holidays. .PP You can specify one ore more of the following federal states to get the list of holidays local to that state: .PP .Vb 10 \& bw Baden\-Wuerttemberg \& by Freistaat Bayern \& be Berlin \& bb Brandenburg \& hb Freie Hansestadt Bremen \& hh Freie und Hansestadt Hamburg \& he Hessen \& mv Mecklenburg\-Vorpommern \& ni Niedersachsen \& nw Nordrhein\-Westfalen \& rp Rheinland\-Pfalz \& sl Saarland \& sn Freistaat Sachsen \& st Sachsen\-Anhalt \& sh Schleswig\-Holstein \& th Freistaat Thueringen .Ve .PP For example, .PP .Vb 1 \& my $feiertage_ref = holidays(WHERE=>[\*(Aqby\*(Aq, \*(Aqbw\*(Aq]); .Ve .PP returns the list of holidays local to Bayern or Baden-Wuerttemberg. .PP To get the list of local holidays along with the default list of common German holidays, use the following: .PP .Vb 1 \& my $feiertage_ref = holidays(WHERE=>[\*(Aqcommon\*(Aq, \*(Aqbw\*(Aq]); .Ve .PP returns the list of common German holidays merged with the list of holidays specific to Baden-Wuerttemberg. .PP You can also request a list containing all holidays this module knows about: .PP .Vb 1 \& my $feiertage_ref = holidays(WHERE=>[\*(Aqall\*(Aq]); .Ve .PP will return a list of all known holidays. This was added in version 0.6. .SS "\s-1ADDITIONAL HOLIDAYS\s0" .IX Subsection "ADDITIONAL HOLIDAYS" There are a number of holidays that aren't really holidays, e.g. New Year's Eve and Christmas Eve. These aren't contained in the \fIcommon\fR set of holidays returned by the \fB\fBholidays()\fB\fR function. The aforementioned \fIsilv\fR and \fIheil\fR are probably the most likely ones that you'll need. If you live in Koeln, you'll probably want to include \fIromo\fR and \fIfadi\fR, too. ;\-) .PP As if things weren't bad enough already, there even are Holidays that aren't valid in an entire state. This refers to \fIfron\fR, \fIalhe\fR and \fImari\fR in particular. .PP If you want one or several of them to appear in the output from \fB\fBholidays()\fB\fR, use the following: .PP .Vb 1 \& my $feiertage_ref = holidays(ADD=>[\*(Aqheil\*(Aq, \*(Aqsilv\*(Aq]); .Ve .SS "\s-1SPECIFYING THE YEAR\s0" .IX Subsection "SPECIFYING THE YEAR" By default, \fB\fBholidays()\fB\fR returns the holidays for the current year. Specify a year as follows: .PP .Vb 1 \& my $feiertage_ref = holidays(YEAR=>2004); .Ve .SS "\s-1HOLIDAYS ON WEEKENDS\s0" .IX Subsection "HOLIDAYS ON WEEKENDS" By default, \fB\fBholidays()\fB\fR includes Holidays that occur on weekends in its listing. .PP To disable this behaviour, set the \fI\s-1WEEKENDS\s0\fR option to 0: .PP .Vb 1 \& my $feiertage_ref = holidays(WEEKENDS=>0); .Ve .SH "COMPLETE EXAMPLE" .IX Header "COMPLETE EXAMPLE" Get all holidays for Germany and Bayern in 2004, count New Year's Eve and Christmas Eve as Holidays. Also, we live in a catholic region where Assumption day is a holiday, too. Exclude weekends and return the date list in human readable format: .PP .Vb 5 \& my $feiertage_ref = holidays( WHERE => [\*(Aqcommon\*(Aq, \*(Aqhe\*(Aq], \& FORMAT => "%a, %d.%m.%Y", \& WEEKENDS => 0, \& YEAR => 2004, \& ADD => [\*(Aqheil\*(Aq, \*(Aqsilv\*(Aq, \*(Aqmari\*(Aq]); .Ve .SH "PREREQUISITES" .IX Header "PREREQUISITES" Uses \fBDate::Calc 5.0\fR for all calculations. Makes use of the \fB\s-1POSIX\s0\fR and \&\fBTime::Local\fR modules from the standard Perl distribution. .SH "BUGS & SUGGESTIONS" .IX Header "BUGS & SUGGESTIONS" If you run into a miscalculation, need some sort of feature or an additional holiday, or if you know of any new changes to our funky holiday situation, please drop the author a note. .PP Patches are welcome. If you can, please fork the project on \fIgithub\fR to submit your change: .PP .Vb 1 \& http://github.com/mschmitt/Date\-Holidays\-DE .Ve .PP \&\fITag der Deutschen Einheit\fR was moved from June 17th to October 3rd in 1990 and is therefore listed twice when calculating holidays for 1990. This is not a bug. Awareness for this was introduced in Version 1.1. .SH "OFFICIAL HOLIDAY INFORMATION" .IX Header "OFFICIAL HOLIDAY INFORMATION" The German Federal Ministry of the Interior used to publish a comprehensive list of holiday dates. This does currently not appear to be the case. .SH "LIMITATIONS" .IX Header "LIMITATIONS" \&\fBDate::Calc\fR works with year, month and day numbers exclusively. Even though this module uses \fBDate::Calc\fR for all calculations, it represents the calculated holidays as \s-1UNIX\s0 timestamps (seconds since The Epoch) to allow for more flexible formatting. On Perl versions earlier than 5.12.0 (released 2010), this limits the range of years to work on to the years from 1972 to 2037. .PP Historic regulations for \fIBuss\- und Bettag\fR are still not implemented. .PP \&\fBDate::Holidays::DE\fR is not configurable. Holiday changes don't come over night and a new module release can be rolled out within a single day. .SH "AUTHOR" .IX Header "AUTHOR" Martin Schmitt .SH "SEE ALSO" .IX Header "SEE ALSO" perl, Date::Calc.