swedish_holidays.pl -- generate Swedish holidays

This Perl script will generate Swedish holidays ("röda dagar") until the year 2299, when the algorithm for calculating Easter Sunday breaks down.

Requires Perl and the Date::Calc module from CPAN.

If used with the -o flag, three files will be generated. One, filename.sql, will contain SQL statements for our time reporting database (only if used in conjunction with the -A switch). Another, filename.txt, will be a tab-separated file that can be imported into MS Outlook. The third, filename.csv, is a generic comma-separated file.

The -A flag will include holidays specific to Agero, my employer. These holidays can be altered by the user: see the comments in the start of the script.

Previously, two versions were distributed; one with locale support and one without. However, the locale situation on different free Un*x systems is a shambles, so I've merged the versions into a new one swedish_holidays.pl.

---------------------------------------------------------------------------
Usage: ./swedish_holidays.pl [-o filename] [-A] [-h] start_year [end_year]

     Options:
     -o filename: if specified, output will be written to the files
                  filename.sql (if the -A flag is set), filename.txt,
                  and filename.csv.
     -A : if specified, custom holidays will be included.
     -h : this message.

Användning: ./swedish_holidays.pl [-o filnamn] [-A] [-h] startår [slutår]

     Alternativ:
     -o filnamn : tre filer kommer att genereras: filnamn.sql (tillsammans
                  med -A flaggan), filnamn.txt (tabseparerade värden) och
                  filnamn.csv.
     -A : användardefinierade helger kommer att skrivas ut.
     -h : detta meddelande
---------------------------------------------------------------------------

Download swedish_holidays.pl


Gustaf Erikson
last changed: <[an error occurred while processing this directive]>