-
-
30 Dec 2021 06:01:38 UTC
- Distribution: Date-Holidays-RU
- Module version: 1.2022.1
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (536 / 0 / 0)
- Kwalitee
Bus factor: 1- 88.32% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (12.47KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Date::Holidays::RU - Determine Russian Federation official holidays and business days.
VERSION
version 1.2022.1
SYNOPSIS
use Date::Holidays::RU qw( is_holiday holidays is_business_day ); binmode STDOUT, ':encoding(UTF-8)'; my ( $year, $month, $day ) = ( localtime )[ 5, 4, 3 ]; $year += 1900; $month += 1; if ( my $holidayname = is_holiday( $year, $month, $day ) ) { print "Today is a holiday: $holidayname\n"; } my $ref = holidays( $year ); while ( my ( $md, $name ) = each %$ref ) { print "On $md there is a holiday named $name\n"; } if ( is_business_day( 2012, 03, 11 ) ) { print "2012-03-11 is business day on weekend\n"; } if ( is_short_business_day( 2015, 04, 30 ) ) { print "2015-04-30 is short business day\n"; }
is_holiday( $year, $month, $day )
Determine whether this date is a RU holiday. Returns holiday name or undef.
is_ru_holiday( $year, $month, $day )
Alias for is_holiday().
holidays( $year )
Returns hash ref of all RU holidays in the year.
is_business_day( $year, $month, $day )
Returns true if date is a business day in RU taking holidays and weekends into account.
is_short_business_day( $year, $month, $day )
Returns true if date is a shortened business day in RU.
NAME
Date::Holidays::RU
VERSION
version 1.2022.1
AUTHOR
Alexander Nalobin,
<alexander at nalobin.ru>
Aleksey Korabelshchikov,<liosha at cpan.org>
AUTHOR
Alexander Nalobin <alexander@nalobin.ru>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by Alexander Nalobin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Date::Holidays::RU, copy and paste the appropriate command in to your terminal.
cpanm Date::Holidays::RU
perl -MCPAN -e shell install Date::Holidays::RU
For more information on module installation, please visit the detailed CPAN module installation guide.