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