File Coverage

blib/lib/Date/Holidays/GB/NIR.pm
Criterion Covered Total %
statement 12 16 75.0
branch 0 4 0.0
condition n/a
subroutine 4 6 66.6
pod 0 2 0.0
total 16 28 57.1


line stmt bran cond sub pod time code
1              
2             our $VERSION = '0.021'; # VERSION
3              
4             use strict;
5 1     1   401 use warnings;
  1         1  
  1         25  
6 1     1   4  
  1         2  
  1         29  
7             use Date::Holidays::GB;
8 1     1   5  
  1         1  
  1         41  
9             use base qw( Exporter );
10 1     1   7 our @EXPORT_OK = qw(
  1         6  
  1         242  
11             holidays
12             is_holiday
13             );
14              
15             my %args
16             = $_[0] =~ m/\D/
17 0 0   0 0   ? @_
18             : ( year => $_[0] );
19              
20             return Date::Holidays::GB::holidays( %args, regions => [ 'NIR' ] );
21             }
22 0            
23             my %args
24             = $_[0] =~ m/\D/
25             ? @_
26 0 0   0 0   : ( year => $_[0], month => $_[1], day => $_[2] );
27              
28             return Date::Holidays::GB::is_holiday( %args, regions => [ 'NIR' ] );
29             }
30              
31 0           1;
32              
33              
34             =head1 NAME
35              
36             Date::Holidays::GB::NIR - Date::Holidays class for GB-NIR (Northern Ireland)
37              
38             =head1 SYNOPSIS
39              
40             use Date::Holidays::GB::NIR qw( holidays is_holiday );
41              
42             # All holidays for Northern Ireland
43             my $holidays = holidays( year => 2013 );
44              
45             if ( is_holiday( year => 2013, month => 12, day => 25 ) ) {
46             print "No work today!";
47             }
48              
49             =cut
50