| 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 | 2 | require 5; | |
| 9 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 2 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 2 | ▶ | use vars qw( $VERSION ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 2 | $VERSION = 0.001; | |
| 14 | |||
| 15 | 2 | ▶ | use Data::Quantity::Abstract::InstanceIndex '-isasubclass'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | # undef = Data::Quantity::Time::DayOfWeek->scale(); | ||
| 18 | 0 | ▶ | sub scale { |
|
Subroutine
scale: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 19 | 0 | return 'DayOfWeek'; | |
| 20 | } | ||
| 21 | |||
| 22 | 2 | Data::Quantity::Time::DayOfWeek->instances(); | |
| 23 | 2 | 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 | 2 | 1; | |