line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
### Change History |
2
|
|
|
|
|
|
|
# 1999-02-21 Added weekday and weekend attributes. |
3
|
|
|
|
|
|
|
# 1998-12-03 Factored out Data::Quantity::Abstract::InstanceIndex superclass. |
4
|
|
|
|
|
|
|
# 1998-12-02 Created. -Simon |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Data::Quantity::Time::DayOfWeek; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require 5; |
9
|
2
|
|
|
2
|
|
7383
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
66
|
|
10
|
2
|
|
|
2
|
|
12
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
121
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
10
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
98
|
|
13
|
|
|
|
|
|
|
$VERSION = 0.001; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
533
|
use Data::Quantity::Abstract::InstanceIndex '-isasubclass'; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
56
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# undef = Data::Quantity::Time::DayOfWeek->scale(); |
18
|
|
|
|
|
|
|
sub scale { |
19
|
0
|
|
|
0
|
0
|
|
return 'DayOfWeek'; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Data::Quantity::Time::DayOfWeek->instances(); |
23
|
|
|
|
|
|
|
Data::Quantity::Time::DayOfWeek->instances( [ |
24
|
|
|
|
|
|
|
{ |
25
|
|
|
|
|
|
|
}, |
26
|
|
|
|
|
|
|
{ |
27
|
|
|
|
|
|
|
'name' => 'Monday', |
28
|
|
|
|
|
|
|
'short' => 'Mon', |
29
|
|
|
|
|
|
|
'initial' => 'M', |
30
|
|
|
|
|
|
|
'weekday' => 1, |
31
|
|
|
|
|
|
|
}, |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
'name' => 'Tuesday', |
34
|
|
|
|
|
|
|
'short' => 'Tue', |
35
|
|
|
|
|
|
|
'initial' => 'T', |
36
|
|
|
|
|
|
|
'weekday' => 1, |
37
|
|
|
|
|
|
|
}, |
38
|
|
|
|
|
|
|
{ |
39
|
|
|
|
|
|
|
'name' => 'Wednesday', |
40
|
|
|
|
|
|
|
'short' => 'Wed', |
41
|
|
|
|
|
|
|
'initial' => 'W', |
42
|
|
|
|
|
|
|
'weekday' => 1, |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
{ |
45
|
|
|
|
|
|
|
'name' => 'Thursday', |
46
|
|
|
|
|
|
|
'short' => 'Thr', |
47
|
|
|
|
|
|
|
'initial' => 'R', |
48
|
|
|
|
|
|
|
'weekday' => 1, |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
{ |
51
|
|
|
|
|
|
|
'name' => 'Friday', |
52
|
|
|
|
|
|
|
'short' => 'Fri', |
53
|
|
|
|
|
|
|
'initial' => 'F', |
54
|
|
|
|
|
|
|
'weekday' => 1, |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
{ |
57
|
|
|
|
|
|
|
'name' => 'Saturday', |
58
|
|
|
|
|
|
|
'short' => 'Sat', |
59
|
|
|
|
|
|
|
'initial' => 'S', |
60
|
|
|
|
|
|
|
'weekend' => 1, |
61
|
|
|
|
|
|
|
}, |
62
|
|
|
|
|
|
|
{ |
63
|
|
|
|
|
|
|
'name' => 'Sunday', |
64
|
|
|
|
|
|
|
'short' => 'Sun', |
65
|
|
|
|
|
|
|
'initial' => 'U', |
66
|
|
|
|
|
|
|
'weekend' => 1, |
67
|
|
|
|
|
|
|
}, |
68
|
|
|
|
|
|
|
] ); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |