|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
  
 
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package Date::Easy::Date;  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
3
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
90
 | 
 use strict;  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
25
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
401
 | 
    | 
| 
4
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
63
 | 
 use warnings;  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
25
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
352
 | 
    | 
| 
5
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
61
 | 
 use autodie;  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
22
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
65
 | 
    | 
| 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our $VERSION = '0.10'; # VERSION  | 
| 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
9
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
65765
 | 
 use Exporter;  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
29
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
688
 | 
    | 
| 
10
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
99
 | 
 use parent 'Exporter';  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
28
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
85
 | 
    | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our @EXPORT_OK = qw< date today >;  | 
| 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 our %EXPORT_TAGS = ( all => \@EXPORT_OK );  | 
| 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
14
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
1681
 | 
 use parent 'Date::Easy::Datetime';  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
34
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
54
 | 
    | 
| 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
16
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
691
 | 
 use Carp;  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
26
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
735
 | 
    | 
| 
17
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
75
 | 
 use Scalar::Util 'blessed';  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
20
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
536
 | 
    | 
| 
18
 | 
15
 | 
 
 | 
 
 | 
  
15
  
 | 
 
 | 
72
 | 
 use Time::Local 1.26, qw< timegm_modern >;  | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
19
 | 
    | 
| 
 
 | 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
13619
 | 
    | 
| 
19
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
20
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
21
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 ##############################  | 
| 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # FUNCTIONS (*NOT* METHODS!) #  | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 ##############################  | 
| 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
25
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub date  | 
| 
27
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 {  | 
| 
28
 | 
277
 | 
 
 | 
 
 | 
  
277
  
 | 
  
1
  
 | 
315963
 | 
 	my $date = shift;  | 
| 
29
 | 
277
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
1703
 | 
 	if ( $date =~ /^-?\d+$/ )  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	{  | 
| 
31
 | 
13
 | 
  
100
  
 | 
  
100
  
 | 
 
 | 
 
 | 
61
 | 
 		if ($date < 29000000 and $date >= 10000000)  | 
| 
32
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		{  | 
| 
33
 | 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
45
 | 
 			my @time = $date =~ /^(\d{4})(\d{2})(\d{2})$/;  | 
| 
34
 | 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
25
 | 
 			return Date::Easy::Date->new(@time);  | 
| 
35
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		}  | 
| 
36
 | 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
24
 | 
 		return Date::Easy::Date->new($date);  | 
| 
37
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	}  | 
| 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	elsif ( $date !~ /\d/ )  | 
| 
39
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	{  | 
| 
40
 | 
19
 | 
 
 | 
 
 | 
 
 | 
 
 | 
43
 | 
 		my $time = _parsedate($date);  | 
| 
41
 | 
19
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
7125
 | 
 		croak("Illegal date: $date") unless defined $time;  | 
| 
42
 | 
18
 | 
 
 | 
 
 | 
 
 | 
 
 | 
47
 | 
 		return Date::Easy::Date->new($time);  | 
| 
43
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	}  | 
| 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	else  | 
| 
45
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	{  | 
| 
46
 | 
245
 | 
 
 | 
 
 | 
 
 | 
 
 | 
659
 | 
 		my (undef,undef,undef, $d, $m, $y)								# ignore first 3 values (time portion)  | 
| 
47
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			= Date::Easy::Datetime::_strptime($date, 'local');			# remember: parse as local, store as UTC  | 
| 
48
 | 
245
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
518
 | 
 		if (defined $y)													# they're either all defined, or it's bogus  | 
| 
49
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		{  | 
| 
50
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			# return value from _strptime for month is still in the funky 0 - 11 range  | 
| 
51
 | 
153
 | 
 
 | 
 
 | 
 
 | 
 
 | 
439
 | 
 			return Date::Easy::Date->new($y, $m + 1, $d);  | 
| 
52
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		}  | 
| 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		else  | 
| 
54
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		{  | 
| 
55
 | 
92
 | 
 
 | 
 
 | 
 
 | 
 
 | 
213
 | 
 			my $time = _parsedate($date);  | 
| 
56
 | 
92
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
23298
 | 
 			croak("Illegal date: $date") unless defined $time;  | 
| 
57
 | 
75
 | 
 
 | 
 
 | 
 
 | 
 
 | 
201
 | 
 			return Date::Easy::Date->new($time);  | 
| 
58
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		}  | 
| 
59
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	}  | 
| 
60
 | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
0
 | 
 	die("reached unreachable code");  | 
| 
61
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
62
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
63
 | 
5
 | 
 
 | 
 
 | 
  
5
  
 | 
  
1
  
 | 
2562
 | 
 sub today () { Date::Easy::Date->new }  | 
| 
64
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
65
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
66
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub _parsedate  | 
| 
67
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 {  | 
| 
68
 | 
111
 | 
 
 | 
 
 | 
  
111
  
 | 
 
 | 
1198
 | 
 	require Time::ParseDate;  | 
| 
69
 | 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
9127
 | 
 	my $string = shift;  | 
| 
70
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
71
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	# Remove any timezone specifier so we get the date as it was in that timezone.  | 
| 
72
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	# I've gathered up all timezone matching code from Time::ParseDate as of v2015.103.  | 
| 
73
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 																		# matching code from Time/ParseDate.pm:  | 
| 
74
 | 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
263
 | 
 	my $break = qr{(?:\s+|\Z|\b(?![-:.,/]\d))};												# line 67  | 
| 
75
 | 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1288
 | 
 	$string =~ s/  | 
| 
76
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			(?:  | 
| 
77
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 					[+-] \d\d:?\d\d \s+ \( "? (?: [A-Z]{1,4}[TCW56] | IDLE ) \)				# lines 424-435  | 
| 
78
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 				|	GMT \s* [-+]\d{1,2}														# line 441  | 
| 
79
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 				|	(?: GMT \s* )? [+-] \d\d:?\d\d											# line 452  | 
| 
80
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 				|	"? (?: [A-Z]{1,4}[TCW56] | IDLE )										# line 457 (and 695-700)  | 
| 
81
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			) $break //x;  | 
| 
82
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
83
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	# We *must* force scalar context.  Remember, parsedate called in list context also returns the  | 
| 
84
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	# "remainder" of the parsed string (which is often undef, which could wreak havoc with a call  | 
| 
85
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	# that incorporates our return value, particularly one to _mktime).  | 
| 
86
 | 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
295
 | 
 	return scalar Time::ParseDate::parsedate($string, DATE_REQUIRED => 1);  | 
| 
87
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
88
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
89
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
90
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #######################  | 
| 
91
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # REGULAR CLASS STUFF #  | 
| 
92
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 #######################  | 
| 
93
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
94
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
95
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub new  | 
| 
96
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 {  | 
| 
97
 | 
2121
 | 
 
 | 
 
 | 
  
2121
  
 | 
  
1
  
 | 
147189
 | 
 	my $class = shift;  | 
| 
98
 | 
2121
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2823
 | 
 	my ($y, $m, $d);  | 
| 
99
 | 
2121
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
3860
 | 
 	if (@_ == 3)  | 
| 
100
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	{  | 
| 
101
 | 
275
 | 
 
 | 
 
 | 
 
 | 
 
 | 
431
 | 
 		($y, $m, $d) = @_;  | 
| 
102
 | 
275
 | 
 
 | 
 
 | 
 
 | 
 
 | 
357
 | 
 		--$m;										# timegm will expect month as 0..11  | 
| 
103
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	}  | 
| 
104
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	else  | 
| 
105
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	{  | 
| 
106
 | 
1846
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2572
 | 
 		my ($time) = @_;  | 
| 
107
 | 
1846
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
3258
 | 
 		$time = time unless defined $time;  | 
| 
108
 | 
1846
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
4688
 | 
 		if (my $conv_class = blessed $time)  | 
| 
109
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		{  | 
| 
110
 | 
1739
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
3881
 | 
 			if ( $time->isa('Time::Piece') )  | 
| 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			{  | 
| 
112
 | 
1737
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3337
 | 
 				($d, $m, $y) = ($time->mday, $time->_mon, $time->year);  | 
| 
113
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			}  | 
| 
114
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			else  | 
| 
115
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			{  | 
| 
116
 | 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
24
 | 
 				croak("Don't know how to convert $conv_class to $class");  | 
| 
117
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 			}  | 
| 
118
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		}  | 
| 
119
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		else  | 
| 
120
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		{  | 
| 
121
 | 
107
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1468
 | 
 			($d, $m, $y) = (localtime $time)[3..5];						# `Date`s are parsed relative to local time ...  | 
| 
122
 | 
107
 | 
 
 | 
 
 | 
 
 | 
 
 | 
329
 | 
 			$y += 1900;			# (no 2-digit dates allowed!)  | 
| 
123
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 		}  | 
| 
124
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	}  | 
| 
125
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
126
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 	my $truncated_date =  | 
| 
127
 | 
2119
 | 
 
 | 
 
 | 
 
 | 
 
 | 
17020
 | 
 			eval { timegm_modern( 0,0,0, $d,$m,$y ) };					# ... but stored as UTC  | 
| 
 
 | 
2119
 | 
 
 | 
 
 | 
 
 | 
 
 | 
4804
 | 
    | 
| 
128
 | 
2119
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
56491
 | 
 	croak("Illegal date: $y/" . ($m + 1) . "/$d") unless defined $truncated_date;  | 
| 
129
 | 
2116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
3869
 | 
 	return $class->_mkdate($truncated_date);  | 
| 
130
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
131
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
132
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub _mkdate  | 
| 
133
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 {  | 
| 
134
 | 
2116
 | 
 
 | 
 
 | 
  
2116
  
 | 
 
 | 
3033
 | 
 	my ($invocant, $epoch) = @_;  | 
| 
135
 | 
2116
 | 
 
 | 
  
 33
  
 | 
 
 | 
 
 | 
5608
 | 
 	my $class = ref $invocant || $invocant;  | 
| 
136
 | 
2116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5109
 | 
 	return bless Date::Easy::Datetime->new(UTC => $epoch), $class;		# always UTC  | 
| 
137
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
138
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
139
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
140
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 ############################  | 
| 
141
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # OVERRIDDEN FROM DATETIME #  | 
| 
142
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 ############################  | 
| 
143
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
144
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
145
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub split  | 
| 
146
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 {  | 
| 
147
 | 
1
 | 
 
 | 
 
 | 
  
1
  
 | 
  
1
  
 | 
520
 | 
 	my $impl = shift->{impl};  | 
| 
148
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5
 | 
 	( $impl->year, $impl->mon, $impl->mday )  | 
| 
149
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
150
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
151
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
152
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # override addition and subtraction  | 
| 
153
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # numbers added to a ::Date are days  | 
| 
154
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
155
 | 
978
 | 
 
 | 
 
 | 
  
978
  
 | 
 
 | 
1850
 | 
 sub _add_integer		{ $_[0]->add_days($_[1])      }  | 
| 
156
 | 
246
 | 
 
 | 
 
 | 
  
246
  
 | 
 
 | 
432
 | 
 sub _subtract_integer	{ $_[0]->subtract_days($_[1]) }  | 
| 
157
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
158
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
159
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # These are illegal to call.  | 
| 
160
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
390
 | 
 sub add_seconds { die("cannot call add_seconds on a Date value") }  | 
| 
161
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
339
 | 
 sub add_minutes { die("cannot call add_minutes on a Date value") }  | 
| 
162
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
304
 | 
 sub add_hours { die("cannot call add_hours on a Date value") }  | 
| 
163
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
323
 | 
 sub subtract_seconds { die("cannot call subtract_seconds on a Date value") }  | 
| 
164
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
323
 | 
 sub subtract_minutes { die("cannot call subtract_minutes on a Date value") }  | 
| 
165
 | 
2
 | 
 
 | 
 
 | 
  
2
  
 | 
  
1
  
 | 
305
 | 
 sub subtract_hours { die("cannot call subtract_hours on a Date value") }  | 
| 
166
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
167
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
168
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
169
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  | 
| 
170
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
171
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
172
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
173
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # ABSTRACT: easy date class  | 
| 
174
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 # COPYRIGHT  | 
| 
175
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
176
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 __END__  |