line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
### Change History |
2
|
|
|
|
|
|
|
# 1998-12-03 Factored out Data::Quantity::Abstract::InstanceIndex superclass. |
3
|
|
|
|
|
|
|
# 1998-12-02 Created. -Simon |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Data::Quantity::Time::MonthOfYear; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require 5; |
8
|
2
|
|
|
2
|
|
9948
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
135
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
13
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
117
|
|
11
|
|
|
|
|
|
|
$VERSION = 0.001; |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
1756
|
use Data::Quantity::Abstract::InstanceIndex '-isasubclass'; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
33
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# undef = Data::Quantity::Time::MonthOfYear->scale(); |
16
|
|
|
|
|
|
|
sub scale { |
17
|
0
|
|
|
0
|
0
|
|
return 'MonthOfYear'; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Data::Quantity::Time::MonthOfYear->instances(); |
21
|
|
|
|
|
|
|
Data::Quantity::Time::MonthOfYear->instances( [ |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
{ |
25
|
|
|
|
|
|
|
'name' => 'January', |
26
|
|
|
|
|
|
|
'short' => 'Jan', |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'name' => 'February', |
30
|
|
|
|
|
|
|
'short' => 'Feb', |
31
|
|
|
|
|
|
|
}, |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
'name' => 'March', |
34
|
|
|
|
|
|
|
'short' => 'Mar', |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
{ |
37
|
|
|
|
|
|
|
'name' => 'April', |
38
|
|
|
|
|
|
|
'short' => 'Apr', |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
{ |
41
|
|
|
|
|
|
|
'name' => 'May', |
42
|
|
|
|
|
|
|
'short' => 'May', |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
{ |
45
|
|
|
|
|
|
|
'name' => 'June', |
46
|
|
|
|
|
|
|
'short' => 'Jun', |
47
|
|
|
|
|
|
|
}, |
48
|
|
|
|
|
|
|
{ |
49
|
|
|
|
|
|
|
'name' => 'July', |
50
|
|
|
|
|
|
|
'short' => 'Jul', |
51
|
|
|
|
|
|
|
}, |
52
|
|
|
|
|
|
|
{ |
53
|
|
|
|
|
|
|
'name' => 'August', |
54
|
|
|
|
|
|
|
'short' => 'Aug', |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
{ |
57
|
|
|
|
|
|
|
'name' => 'September', |
58
|
|
|
|
|
|
|
'short' => 'Sep', |
59
|
|
|
|
|
|
|
}, |
60
|
|
|
|
|
|
|
{ |
61
|
|
|
|
|
|
|
'name' => 'October', |
62
|
|
|
|
|
|
|
'short' => 'Oct', |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
{ |
65
|
|
|
|
|
|
|
'name' => 'November', |
66
|
|
|
|
|
|
|
'short' => 'Nov', |
67
|
|
|
|
|
|
|
}, |
68
|
|
|
|
|
|
|
{ |
69
|
|
|
|
|
|
|
'name' => 'December', |
70
|
|
|
|
|
|
|
'short' => 'Dec', |
71
|
|
|
|
|
|
|
}, |
72
|
|
|
|
|
|
|
] ); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# $padded = $quantity->zero_padded(); |
76
|
|
|
|
|
|
|
sub zero_padded { |
77
|
0
|
|
|
0
|
0
|
|
my $date = shift; |
78
|
0
|
0
|
|
|
|
|
$date->SUPER::zero_padded( scalar @_ ? @_ : 2 ); |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
1; |