NAME
    Date::Holidays::PL - Determine holidays for Poland

VERSION
    version 1.110050

SYNOPSIS
        use Date::Holidays::PL qw( pl_holidays is_pl_holiday
                                   pl_holidays_dt is_pl_holiday_dt);

        my ($year, $month, $day) = (localtime)[ 5, 4, 3 ];
        $year  += 1900;
        $month += 1;

        # pl_holidays
        my $holidays = pl_holidays( $year );
        for my $month_day ( keys %$holidays ) {
            print "$month_day: $holidays->{$month_day}\n";
        }

        # pl_holidays_dt
        my $holidays_dt = pl_holidays_dt( $year );
        for my $name ( keys %$holidays ) {
            print "$name ", $holidays->{$name}->strftime('%Y-%m-%d'), "\n";
        }

        # is_pl_holiday
        if ( my $name = is_pl_holiday($year, $month, $day) ) {
            print "$year-$month-$day is a public holiday: $name\n";
        }

        # is_pl_holiday_dt
        if ( my $name = is_pl_holiday_dt(DateTime->now) ) {
            print "Today is a public holiday: $name\n";
        }

DESCRIPTION
    Date::Holidays::PL determines public holidays for Poland.

METHODS
  pl_holidays
        my $holidays = pl_holidays( $year );

        my $holidays_excluding_weekends = pl_holidays( $year, { WEEKENDS => 0 } );

    Returns a hashref of all public holidays for given year. Keys are in the
    month-day format *MMDD* and the values are the names of the holidays.

    As the second argument hashref could be provided with one configuration
    option:

    WEEKENDS
        If set to false then the list of holidays will not include those
        which are during weekends.

        Boolean, default true.

  pl_holidays_dt
        my $holidays = pl_holidays_dt( $year );

        my $holidays_excluding_weekends = pl_holidays_dt( $year, { WEEKENDS => 0 } );

    Returns a hashref of all public holidays for given year. Keys are the
    names of the holidays (in Polish) and values are DateTime objects.

    As the second argument hashref could be provided with one configuration
    option:

    WEEKENDS
        If set to false then the list of holidays will not include those
        which are during weekends.

        Boolean, default true.

  is_pl_holiday
        if ( my $name = is_pl_holiday($year, $month, $day) ) {
            print "$year-$month-$day is a public holiday: $name\n";
        }

    Takes three arguments: *year*, *month* and *day*.

    Returns the name of a holiday if date given is a public holiday,
    otherwise returns undef.

  is_pl_holiday_dt
        if ( my $name = is_pl_holiday_dt(DateTime->now) ) {
            print "Today is a public holiday: $name\n";
        }

    Takes one argument: DateTime object.

    Returns the name of a holiday if date given is a public holiday,
    otherwise returns undef.

PUBLIC HOLIDAYS
    The following Polish holidays have fixed dates:

        # New Year's Day
        Jan  1     Nowy Rok
        # Epiphany (1951-1959, 2011+ only)
        Jan  6     Trzech KrГіli
        # Labor Day
        May  1     ЕљwiД™to PaЕ„stwowe
        # Constitution Day ( since 1990 )
        May  3     ЕљwiД™to Narodowe Trzeciego Maja
        # Polish Committee of National Liberation Manifesto (1951-1989 only)
        Jul 22     ЕљwiД™to Odrodzenia Polski
        # Assumption of the Blessed Virgin Mary ( 1951-1959, 1989+ )
        Aug 15     WniebowziД™cie NajЕ›wiД™tszej Maryi Panny
        # All Saints' Day
        Nov  1     Wszystkich ЕљwiД™tych
        # Independence Day ( since 1989 )
        Nov 11     Narodowe ЕљwiД™to NiepodlegЕ‚oЕ›ci
        # Christmas Day
        Dec 25     pierwszy dzieЕ„ BoЕјego Narodzenia
        # Boxing Day
        Dec 26     drugi dzieЕ„ BoЕјego Narodzenia

    List of Polish moveable feasts:

        # Easter Sunday
                   pierwszy dzieЕ„ Wielkanocy
        # Easter Monday
        +1 day     drugi dzieЕ„ Wielkanocy
        # Pantecoste Sunday
        +49 days   pierwszy dzieЕ„ Zielonych ЕљwiД…tek
        # Corpus Christi
        +60 days   dzieЕ„ BoЕјego CiaЕ‚a

    Based on Polish law (since year 1951): Ustawa z dnia 18 stycznia 1951 r.
    o dniach wolnych od pracy
    <http://isap.sejm.gov.pl/DetailsServlet?id=WDU19510040028> and Ustawa z
    dnia 24 wrzeЕ›nia 2010 r. o zmianie ustawy - Kodeks pracy oraz niektГіrych
    innych ustaw <http://isap.sejm.gov.pl/DetailsServlet?id=WDU20102241459>.

EXPORTS
    Date::Holidays::PL uses Sub::Exporter to export following methods:

    *   "pl_holidays"

    *   "pl_holidays_dt"

    *   "is_pl_holiday"

    *   "is_pl_holiday_dt"

    By default no methods are exported.

SEE ALSO
    *   Date::Holidays

    *   Date::Holidays::Abstract

    *   <http://pl.wikipedia.org/wiki/Dni_wolne_od_pracy_w_Polsce>

AUTHOR
    Alex J. G. BurzyЕ„ski <ajgb@cpan.org>

COPYRIGHT AND LICENSE
    This software is copyright (c) 2010 by Alex J. G. BurzyЕ„ski
    <ajgb@cpan.org>.

    This is free software; you can redistribute it and/or modify it under
    the same terms as the Perl 5 programming language system itself.