line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Date::Holidays::GB::SCT; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.023'; # VERSION |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
468
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
6
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Date::Holidays::GB; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use base qw( Exporter ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
225
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
12
|
|
|
|
|
|
|
holidays |
13
|
|
|
|
|
|
|
is_holiday |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub holidays { |
17
|
1
|
50
|
|
1
|
0
|
10
|
my %args |
18
|
|
|
|
|
|
|
= $_[0] =~ m/\D/ |
19
|
|
|
|
|
|
|
? @_ |
20
|
|
|
|
|
|
|
: ( year => $_[0] ); |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
20
|
return Date::Holidays::GB::holidays( %args, regions => [ 'SCT' ] ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub is_holiday { |
26
|
1
|
50
|
|
1
|
0
|
23
|
my %args |
27
|
|
|
|
|
|
|
= $_[0] =~ m/\D/ |
28
|
|
|
|
|
|
|
? @_ |
29
|
|
|
|
|
|
|
: ( year => $_[0], month => $_[1], day => $_[2] ); |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
6
|
return Date::Holidays::GB::is_holiday( %args, regions => [ 'SCT' ] ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Date::Holidays::GB::SCT - Date::Holidays class for GB-SCT (Scotland) |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
use Date::Holidays::GB::SCT qw( holidays is_holiday ); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# All holidays for Scotland |
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
|
|
|
|
|
|
|
|