Date-Holidays-BY
view release on metacpan or search on metacpan
lib/Date/Holidays/BY.pm view on Meta::CPAN
package Date::Holidays::BY;
our $VERSION = '2.2026.0'; # VERSION
=encoding utf8
=head1 NAME
Date::Holidays::BY - Determine public holidays and business days in Belarus.
=head1 SYNOPSIS
use Date::Holidays::BY;
my $holidays = Date::Holidays::BY::holidays( 2024 );
# {
# "0101" => "New Year",
# ...
# "1225" => "Christmas (Catholic Christmas)"
# }
if ( my $holidayname = Date::Holidays::BY::is_holiday( 2007, 1, 1 ) ) {
print "Is a holiday: $holidayname\n";
}
if ( Date::Holidays::BY::is_business_day( 2012, 3, 11 ) ) {
print "2012-03-11 is business day on weekend\n";
}
if ( Date::Holidays::BY::is_short_business_day( 2015, 04, 30 ) ) {
print "2015-04-30 is short business day\n";
}
=cut
=head1 DESCRIPTION
Date::Holidays::BY provides functions to check if a given date is a public holiday in Belarus. This module follows the standard holiday calendar observed in Belarus, including both national holidays and specific religious observances recognized in th...
Imports nothing by default.
=cut
use warnings;
use strict;
use utf8;
use base 'Exporter';
use Carp;
use List::Util;
#require Date::Easter;
#require Time::Piece;
our @EXPORT_OK = qw(
is_holiday
is_by_holiday
holidays
is_business_day
is_short_business_day
);
=head1 CONFIGURATION VARIABLES
=head2 $Date::Holidays::BY::ref
Hash reference containing all static holiday data, including holiday names for i18n support.
Dates are formatted as MMDD (ISO 8601).
=cut
our $ref = {
HOLIDAYS_VALID_SINCE => 1992,
HOLIDAYS => {
'0101' => {
name => {
be => 'ÐÐ¾Ð²Ñ Ð³Ð¾Ð´',
en => 'New Year',
ru => 'ÐовÑй год',
},
days => {
1992 => [ qw( 0101 ) ],
2020 => [ qw( 0101 0102 ) ],
},
},
'0308' => {
name => {
be => 'ÐÐ·ÐµÐ½Ñ Ð¶Ð°Ð½ÑÑн',
en => 'Women\'s Day',
ru => 'ÐÐµÐ½Ñ Ð¶ÐµÐ½Ñин',
},
days => [ qw( 0308 ) ],
},
'0501' => {
name => {
be => 'СвÑÑа пÑаÑÑ',
en => 'Labor Day',
( run in 0.863 second using v1.01-cache-2.11-cpan-8dfa8b56332 )