| 1 | # HTML::CalendarMonthSimple.pm | ||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # Generate HTML calendars. An alternative to HTML::CalendarMonth | ||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # Herein, the symbol $self is used to refer to the object that's being passed around. | ||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||
| 5 | package HTML::CalendarMonthSimple; | ||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | our $VERSION = "1.26"; | |||||||||||||||||||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use Date::Calc; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||
| 12 | # Within the constructor is the only place where values are access directly. | ||||||||||||||||||||||||||||||||||||||||||||||
| 13 | # Methods are provided for accessing/changing values, and those methods | ||||||||||||||||||||||||||||||||||||||||||||||
| 14 | # are used even internally. | ||||||||||||||||||||||||||||||||||||||||||||||
| 15 | # Most of the constructor is assigning default values. | ||||||||||||||||||||||||||||||||||||||||||||||
| 16 | sub new { | ||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 2 | ▶ | my $class = shift; $class = ref($class) || $class; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=8 SCAR=21.4
Pod
documented
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 2 | my $self = {}; %$self = @_; # Load ourselves up from the args | |||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||
| 20 | # figure out the current date (which may be specified as today_year, et al | ||||||||||||||||||||||||||||||||||||||||||||||
| 21 | # then figure out which year+month we're supposed to display | ||||||||||||||||||||||||||||||||||||||||||||||
| 22 | { | ||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 2 | my($year,$month,$date) = Date::Calc::Today(); | |||||||||||||||||||||||||||||||||||||||||||||
| 24 | 2 | ▶ | $self->{'today_year'} = $self->{'today_year'} || $year; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->{'today_year'} || $year
MC/DC0%0/2
$self->{'today_year'} || $year
$self->{'today_year'}
$year
Truth table33%1/3
A || B
A= $self->{'today_year'}B= $year
| |||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 2 | ▶ | $self->{'today_month'} = $self->{'today_month'} || $month; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->{'today_month'} || $month
MC/DC0%0/2
$self->{'today_month'} || $month
$self->{'today_month'}
$month
Truth table33%1/3
A || B
A= $self->{'today_month'}B= $month
| |||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 2 | ▶ | $self->{'today_date'} = $self->{'today_date'} || $date; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$self->{'today_date'} || $date
MC/DC0%0/2
$self->{'today_date'} || $date
$self->{'today_date'}
$date
Truth table33%1/3
A || B
A= $self->{'today_date'}B= $date
| |||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 2 | ▶ | $self->{'month'} = $self->{'month'} || $self->{'today_month'}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$self->{'month'} || $self->{'today_month'}
MC/DC0%0/2
$self->{'month'} || $self->{'today_month'}
$self->{'month'}
$self->{'today_month'}
Truth table66%2/3
A || B
A= $self->{'month'}B= $self->{'today_month'}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 2 | ▶ | $self->{'year'} = $self->{'year'} || $self->{'today_year'}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$self->{'year'} || $self->{'today_year'}
MC/DC0%0/2
$self->{'year'} || $self->{'today_year'}
$self->{'year'}
$self->{'today_year'}
Truth table66%2/3
A || B
A= $self->{'year'}B= $self->{'today_year'}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 2 | $self->{'monthname'} = Date::Calc::Month_to_Text($self->{'month'}); | |||||||||||||||||||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||
| 32 | # Some defaults | ||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 2 | $self->{'border'} = 5; | |||||||||||||||||||||||||||||||||||||||||||||
| 34 | 2 | $self->{'width'} = '100%'; | |||||||||||||||||||||||||||||||||||||||||||||
| 35 | 2 | $self->{'showdatenumbers'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 36 | 2 | $self->{'showweekdayheaders'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 37 | 2 | $self->{'cellalignment'} = 'left'; | |||||||||||||||||||||||||||||||||||||||||||||
| 38 | 2 | $self->{'vcellalignment'} = 'top'; | |||||||||||||||||||||||||||||||||||||||||||||
| 39 | 2 | $self->{'weekdayheadersbig'} = 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 40 | 2 | $self->{'nowrap'} = 0; | |||||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 2 | $self->{'weekdays'} = [qw/Monday Tuesday Wednesday Thursday Friday/]; | |||||||||||||||||||||||||||||||||||||||||||||
| 43 | 2 | $self->{'sunday'} = "Sunday"; | |||||||||||||||||||||||||||||||||||||||||||||
| 44 | 2 | $self->{'saturday'} = "Saturday"; | |||||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||||||
| 46 | # Set the default calendar header | ||||||||||||||||||||||||||||||||||||||||||||||
| 47 | $self->{'header'} = sprintf("<center><font size=\"+2\">%s %d</font></center>", | ||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 2 | Date::Calc::Month_to_Text($self->{'month'}),$self->{'year'}); | |||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||
| 50 | # Initialize the (empty) cell content so the keys are representative of the month | ||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 2 | bless $self,$class; | |||||||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 2 | foreach my $datenumber ( 1 .. $self->Days_in_Month ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 54 | 62 | $self->{'content'}->{$datenumber} = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 55 | 62 | $self->{'datecellclass'}->{$datenumber} = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 56 | 62 | $self->{'datecolor'}->{$datenumber} = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 57 | 62 | $self->{'datebordercolor'}->{$datenumber} = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 58 | 62 | $self->{'datecontentcolor'}->{$datenumber} = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 59 | 62 | $self->{'href'}->{$datenumber} = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||||||
| 62 | # All done! | ||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 2 | return $self; | |||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||||||
| 67 | sub as_HTML { | ||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
as_HTML: not called CC=103 SCAR=92.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | my %params = @_; | |||||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | my $html = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | my(@days,$weeks,$WEEK,$DAY); | |||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||
| 73 | # To make the grid even, pad the start of the series with 0s | ||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | @days = (1 .. $self->Days_in_Month ); | |||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | ▶ | if ($self->weekstartsonmonday()) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | foreach (1 .. (Date::Calc::Day_of_Week($self->year(), | |||||||||||||||||||||||||||||||||||||||||||||
| 77 | $self->month(),1) -1 )) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | unshift(@days,0); | |||||||||||||||||||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 81 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | foreach (1 .. (Date::Calc::Day_of_Week($self->year(), | |||||||||||||||||||||||||||||||||||||||||||||
| 83 | $self->month(),1)%7) ) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | unshift(@days,0); | |||||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | $weeks = int((scalar(@days)+6)/7); | |||||||||||||||||||||||||||||||||||||||||||||
| 88 | # And pad the end as well, to avoid "uninitialized value" warnings | ||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | foreach (scalar(@days)+1 .. $weeks*7) { | |||||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | push(@days,0); | |||||||||||||||||||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||||||
| 93 | # Define some scalars for generating the table | ||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | my $border = $self->border(); | |||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | my $tablewidth = $self->width(); | |||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | my $cellwidth = "*"; | |||||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | ▶ | if (defined($tablewidth) and $tablewidth =~ m/^(\d+)(\%?)$/) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $tablewidth and $tablewidth =~ /^(\d+)(\%?)$/
MC/DC0%0/2
defined $tablewidth and $tablewidth =~ /^(\d+)(\%?)$/
defined $tablewidth
$tablewidth =~ /^(\d+)(\%?)$/
Truth table0%0/3
A and B
A= defined $tablewidthB= $tablewidth =~ /^(\d+)(\%?)$/
| |||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | ▶ | $cellwidth = (int($1/7))||'14'; if ($2) { $cellwidth .= '%'; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
int $1 / 7 || '14'
MC/DC0%0/1
int $1 / 7 || '14'
int $1 / 7
Truth table0%0/2
A
A= int $1 / 7
| |||||||||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | my $header = $self->header(); | |||||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | my $cellalignment = $self->cellalignment(); | |||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | my $vcellalignment = $self->vcellalignment(); | |||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | my $contentfontsize = $self->contentfontsize(); | |||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | my $bgcolor = $self->bgcolor(); | |||||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | my $weekdaycolor = $self->weekdaycolor() || $self->bgcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekdaycolor || $self->bgcolor
MC/DC0%0/2
$self->weekdaycolor || $self->bgcolor
$self->weekdaycolor
$self->bgcolor
Truth table0%0/3
A || B
A= $self->weekdaycolorB= $self->bgcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | ▶ | my $weekendcolor = $self->weekendcolor() || $self->bgcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekendcolor || $self->bgcolor
MC/DC0%0/2
$self->weekendcolor || $self->bgcolor
$self->weekendcolor
$self->bgcolor
Truth table0%0/3
A || B
A= $self->weekendcolorB= $self->bgcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | ▶ | my $todaycolor = $self->todaycolor() || $self->bgcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->todaycolor || $self->bgcolor
MC/DC0%0/2
$self->todaycolor || $self->bgcolor
$self->todaycolor
$self->bgcolor
Truth table0%0/3
A || B
A= $self->todaycolorB= $self->bgcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | my $contentcolor = $self->contentcolor() || $self->contentcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->contentcolor || $self->contentcolor
MC/DC0%0/2
$self->contentcolor || $self->contentcolor
$self->contentcolor
$self->contentcolor
Truth table0%0/3
A || B
A= $self->contentcolorB= $self->contentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | ▶ | my $weekdaycontentcolor = $self->weekdaycontentcolor() || $self->contentcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekdaycontentcolor || $self->contentcolor
MC/DC0%0/2
$self->weekdaycontentcolor || $self->contentcolor
$self->weekdaycontentcolor
$self->contentcolor
Truth table0%0/3
A || B
A= $self->weekdaycontentcolorB= $self->contentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | ▶ | my $weekendcontentcolor = $self->weekendcontentcolor() || $self->contentcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekendcontentcolor || $self->contentcolor
MC/DC0%0/2
$self->weekendcontentcolor || $self->contentcolor
$self->weekendcontentcolor
$self->contentcolor
Truth table0%0/3
A || B
A= $self->weekendcontentcolorB= $self->contentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | my $todaycontentcolor = $self->todaycontentcolor() || $self->contentcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->todaycontentcolor || $self->contentcolor
MC/DC0%0/2
$self->todaycontentcolor || $self->contentcolor
$self->todaycontentcolor
$self->contentcolor
Truth table0%0/3
A || B
A= $self->todaycontentcolorB= $self->contentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | ▶ | my $bordercolor = $self->bordercolor() || $self->bordercolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->bordercolor || $self->bordercolor
MC/DC0%0/2
$self->bordercolor || $self->bordercolor
$self->bordercolor
$self->bordercolor
Truth table0%0/3
A || B
A= $self->bordercolorB= $self->bordercolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | my $weekdaybordercolor = $self->weekdaybordercolor() || $self->bordercolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekdaybordercolor || $self->bordercolor
MC/DC0%0/2
$self->weekdaybordercolor || $self->bordercolor
$self->weekdaybordercolor
$self->bordercolor
Truth table0%0/3
A || B
A= $self->weekdaybordercolorB= $self->bordercolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | ▶ | my $weekendbordercolor = $self->weekendbordercolor() || $self->bordercolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekendbordercolor || $self->bordercolor
MC/DC0%0/2
$self->weekendbordercolor || $self->bordercolor
$self->weekendbordercolor
$self->bordercolor
Truth table0%0/3
A || B
A= $self->weekendbordercolorB= $self->bordercolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | ▶ | my $todaybordercolor = $self->todaybordercolor() || $self->bordercolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->todaybordercolor || $self->bordercolor
MC/DC0%0/2
$self->todaybordercolor || $self->bordercolor
$self->todaybordercolor
$self->bordercolor
Truth table0%0/3
A || B
A= $self->todaybordercolorB= $self->bordercolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | ▶ | my $weekdayheadercolor = $self->weekdayheadercolor() || $self->bgcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekdayheadercolor || $self->bgcolor
MC/DC0%0/2
$self->weekdayheadercolor || $self->bgcolor
$self->weekdayheadercolor
$self->bgcolor
Truth table0%0/3
A || B
A= $self->weekdayheadercolorB= $self->bgcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | ▶ | my $weekendheadercolor = $self->weekendheadercolor() || $self->bgcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekendheadercolor || $self->bgcolor
MC/DC0%0/2
$self->weekendheadercolor || $self->bgcolor
$self->weekendheadercolor
$self->bgcolor
Truth table0%0/3
A || B
A= $self->weekendheadercolorB= $self->bgcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | ▶ | my $headercontentcolor = $self->headercontentcolor() || $self->contentcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->headercontentcolor || $self->contentcolor
MC/DC0%0/2
$self->headercontentcolor || $self->contentcolor
$self->headercontentcolor
$self->contentcolor
Truth table0%0/3
A || B
A= $self->headercontentcolorB= $self->contentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | ▶ | my $weekdayheadercontentcolor = $self->weekdayheadercontentcolor() || $self->contentcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekdayheadercontentcolor || $self->contentcolor
MC/DC0%0/2
$self->weekdayheadercontentcolor || $self->contentcolor
$self->weekdayheadercontentcolor
$self->contentcolor
Truth table0%0/3
A || B
A= $self->weekdayheadercontentcolorB= $self->contentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | my $weekendheadercontentcolor = $self->weekendheadercontentcolor() || $self->contentcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekendheadercontentcolor || $self->contentcolor
MC/DC0%0/2
$self->weekendheadercontentcolor || $self->contentcolor
$self->weekendheadercontentcolor
$self->contentcolor
Truth table0%0/3
A || B
A= $self->weekendheadercontentcolorB= $self->contentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | ▶ | my $headercolor = $self->headercolor() || $self->bgcolor(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->headercolor || $self->bgcolor
MC/DC0%0/2
$self->headercolor || $self->bgcolor
$self->headercolor
$self->bgcolor
Truth table0%0/3
A || B
A= $self->headercolorB= $self->bgcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | my $cellpadding = $self->cellpadding(); | |||||||||||||||||||||||||||||||||||||||||||||
| 123 | 0 | my $cellspacing = $self->cellspacing(); | |||||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | my $sharpborders = $self->sharpborders(); | |||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | my $cellheight = $self->cellheight(); | |||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | my $cellclass = $self->cellclass(); | |||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | my $tableclass = $self->tableclass(); | |||||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | ▶ | my $weekdaycellclass = $self->weekdaycellclass() || $self->cellclass(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekdaycellclass || $self->cellclass
MC/DC0%0/2
$self->weekdaycellclass || $self->cellclass
$self->weekdaycellclass
$self->cellclass
Truth table0%0/3
A || B
A= $self->weekdaycellclassB= $self->cellclass
| |||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | my $weekendcellclass = $self->weekendcellclass() || $self->cellclass(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->weekendcellclass || $self->cellclass
MC/DC0%0/2
$self->weekendcellclass || $self->cellclass
$self->weekendcellclass
$self->cellclass
Truth table0%0/3
A || B
A= $self->weekendcellclassB= $self->cellclass
| |||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | ▶ | my $todaycellclass = $self->todaycellclass() || $self->cellclass(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->todaycellclass || $self->cellclass
MC/DC0%0/2
$self->todaycellclass || $self->cellclass
$self->todaycellclass
$self->cellclass
Truth table0%0/3
A || B
A= $self->todaycellclassB= $self->cellclass
| |||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | my $headerclass = $self->headerclass() || $self->cellclass(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->headerclass || $self->cellclass
MC/DC0%0/2
$self->headerclass || $self->cellclass
$self->headerclass
$self->cellclass
Truth table0%0/3
A || B
A= $self->headerclassB= $self->cellclass
| |||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | my $nowrap = $self->nowrap(); | |||||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||||||
| 134 | # Get today's date, in case there's a todaycolor() | ||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | my($todayyear,$todaymonth,$todaydate) = ($self->today_year(),$self->today_month(),$self->today_date()); | |||||||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||||||
| 137 | # the table declaration - sharpborders wraps the table inside a table cell | ||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | ▶ | if ($sharpborders) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | $html .= "<table border=\"0\""; | |||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | ▶ | $html .= " class=\"$tableclass\"" if defined $tableclass; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 0 | ▶ | $html .= " width=\"$tablewidth\"" if defined $tablewidth; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | $html .= " cellpadding=\"0\" cellspacing=\"0\">\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | $html .= "<tr valign=\"top\" align=\"left\">\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | $html .= "<td align=\"left\" valign=\"top\""; | |||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ▶ | $html .= " bgcolor=\"$bordercolor\"" if defined $bordercolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | $html .= ">"; | |||||||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | $html .= "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\">"; | |||||||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 149 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | $html .= "<table"; | |||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | ▶ | $html .= " class=\"$tableclass\"" if defined $tableclass; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | ▶ | $html .= " border=\"$border\"" if defined $border; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | ▶ | $html .= " width=\"$tablewidth\"" if defined $tablewidth; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | ▶ | $html .= " bgcolor=\"$bgcolor\"" if defined $bgcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | ▶ | $html .= " bordercolor=\"$bordercolor\"" if defined $bordercolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | ▶ | $html .= " cellpadding=\"$cellpadding\"" if defined $cellpadding; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | ▶ | $html .= " cellspacing=\"$cellspacing\"" if defined $cellspacing; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | $html .= ">\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 160 | # the header | ||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | if ($header) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | $html .= "<tr><td colspan=\"7\""; | |||||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | ▶ | $html .= " bgcolor=\"$headercolor\"" if defined $headercolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 0 | ▶ | $html .= " class=\"$headerclass\"" if defined $headerclass; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | $html .= ">"; | |||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | ▶ | $html .= "<font color=\"$headercontentcolor\">" if defined $headercontentcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | $html .= $header; | |||||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | $html .= "</font>" if defined $headercontentcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | $html .= "</td></tr>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 171 | # the names of the days of the week | ||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | ▶ | if ($self->showweekdayheaders) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | ▶ | my $celltype = $self->weekdayheadersbig() ? "th" : "td"; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | my @weekdays = $self->weekdays(); | |||||||||||||||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | ▶ | my $saturday_html = "<$celltype" | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 177 | . ( defined $weekendheadercolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 178 | ? qq| bgcolor="$weekendheadercolor"| | ||||||||||||||||||||||||||||||||||||||||||||||
| 179 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 180 | . ( defined $weekendcellclass | ||||||||||||||||||||||||||||||||||||||||||||||
| 181 | ? qq| class="$weekendcellclass"| | ||||||||||||||||||||||||||||||||||||||||||||||
| 182 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 183 | . ">" | ||||||||||||||||||||||||||||||||||||||||||||||
| 184 | . ( defined $weekendheadercontentcolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 185 | ? qq|<font color="$weekendheadercontentcolor">| | ||||||||||||||||||||||||||||||||||||||||||||||
| 186 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 187 | . $self->saturday() | ||||||||||||||||||||||||||||||||||||||||||||||
| 188 | . ( defined $weekendheadercontentcolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 189 | ? qq|</font>| | ||||||||||||||||||||||||||||||||||||||||||||||
| 190 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 191 | . "</$celltype>\n"; | ||||||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | ▶ | my $sunday_html = "<$celltype" | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 194 | . ( defined $weekendheadercolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 195 | ? qq| bgcolor="$weekendheadercolor"| | ||||||||||||||||||||||||||||||||||||||||||||||
| 196 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 197 | . ( defined $weekendcellclass | ||||||||||||||||||||||||||||||||||||||||||||||
| 198 | ? qq| class="$weekendcellclass"| | ||||||||||||||||||||||||||||||||||||||||||||||
| 199 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 200 | . ">" | ||||||||||||||||||||||||||||||||||||||||||||||
| 201 | . ( defined $weekendheadercontentcolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 202 | ? qq|<font color="$weekendheadercontentcolor">| | ||||||||||||||||||||||||||||||||||||||||||||||
| 203 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 204 | . $self->sunday() | ||||||||||||||||||||||||||||||||||||||||||||||
| 205 | . ( defined $weekendheadercontentcolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 206 | ? qq|</font>| | ||||||||||||||||||||||||||||||||||||||||||||||
| 207 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 208 | . "</$celltype>\n"; | ||||||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | my $weekday_html = ''; | |||||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | foreach (@weekdays) { # draw the weekday headers | |||||||||||||||||||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 0 | ▶ | $weekday_html .= "<$celltype" | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 214 | . ( defined $weekendheadercolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 215 | ? qq| bgcolor="$weekdayheadercolor"| | ||||||||||||||||||||||||||||||||||||||||||||||
| 216 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 217 | . ( defined $weekendcellclass | ||||||||||||||||||||||||||||||||||||||||||||||
| 218 | ? qq| class="$weekdaycellclass"| | ||||||||||||||||||||||||||||||||||||||||||||||
| 219 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 220 | . ">" | ||||||||||||||||||||||||||||||||||||||||||||||
| 221 | . ( defined $weekdayheadercontentcolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 222 | ? qq|<font color="$weekdayheadercontentcolor">| | ||||||||||||||||||||||||||||||||||||||||||||||
| 223 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 224 | . $_ | ||||||||||||||||||||||||||||||||||||||||||||||
| 225 | . ( defined $weekdayheadercontentcolor | ||||||||||||||||||||||||||||||||||||||||||||||
| 226 | ? qq|</font>| | ||||||||||||||||||||||||||||||||||||||||||||||
| 227 | : '' ) | ||||||||||||||||||||||||||||||||||||||||||||||
| 228 | . "</$celltype>\n"; | ||||||||||||||||||||||||||||||||||||||||||||||
| 229 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 0 | $html .= "<tr>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 232 | 0 | ▶ | if ($self->weekstartsonmonday()) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | $html .= $weekday_html | |||||||||||||||||||||||||||||||||||||||||||||
| 234 | . $saturday_html | ||||||||||||||||||||||||||||||||||||||||||||||
| 235 | . $sunday_html; | ||||||||||||||||||||||||||||||||||||||||||||||
| 236 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 237 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 238 | 0 | $html .= $sunday_html | |||||||||||||||||||||||||||||||||||||||||||||
| 239 | . $weekday_html | ||||||||||||||||||||||||||||||||||||||||||||||
| 240 | . $saturday_html; | ||||||||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | $html .= "</tr>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 243 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | my $_saturday_index = 6; | |||||||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | my $_sunday_index = 0; | |||||||||||||||||||||||||||||||||||||||||||||
| 247 | 0 | ▶ | if ($self->weekstartsonmonday()) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 0 | $_saturday_index = 5; | |||||||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | $_sunday_index = 6; | |||||||||||||||||||||||||||||||||||||||||||||
| 250 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 251 | # now do each day, the actual date-content-containing cells | ||||||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | foreach $WEEK (0 .. ($weeks-1)) { | |||||||||||||||||||||||||||||||||||||||||||||
| 253 | 0 | $html .= "<tr>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 0 | foreach $DAY ( 0 .. 6 ) { | |||||||||||||||||||||||||||||||||||||||||||||
| 257 | 0 | my($thiscontent,$thisday,$thisbgcolor,$thisbordercolor,$thiscontentcolor,$thiscellclass); | |||||||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | $thisday = $days[((7*$WEEK)+$DAY)]; | |||||||||||||||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||||||||||||||||
| 260 | # Get the cell content | ||||||||||||||||||||||||||||||||||||||||||||||
| 261 | 0 | ▶ | if (! $thisday) { # If it's a dummy cell, no content | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | $thiscontent = ' '; } | |||||||||||||||||||||||||||||||||||||||||||||
| 263 | else { # A real date cell with potential content | ||||||||||||||||||||||||||||||||||||||||||||||
| 264 | # Get the content | ||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | ▶ | if ($self->showdatenumbers()) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | if ( $self->getdatehref( $thisday )) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | $thiscontent = "<p><b><a href=\"".$self->getdatehref($thisday); | |||||||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | $thiscontent .= "\">$thisday</a></b></p>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 269 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | $thiscontent = "<p><b>$thisday</b></p>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 271 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 272 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | $thiscontent .= $self->{'content'}->{$thisday}; | |||||||||||||||||||||||||||||||||||||||||||||
| 274 | 0 | ▶ | $thiscontent ||= ' '; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$thiscontent ||= " "
MC/DC0%0/1
$thiscontent ||= " "
$thiscontent
Truth table0%0/2
A
A= $thiscontent
| |||||||||||||||||||||||||||||||||||||||||||||||
| 275 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||||||||||
| 277 | # Get the cell's coloration and CSS class | ||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | if ($self->year == $todayyear && $self->month == $todaymonth && $thisday == $todaydate) | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/6
$self->year == $todayyear and $self->month == $todaymonth and $thisday == $todaydate
$self->year == $todayyear and $self->month == $todaymonth
MC/DC0%0/3
$self->year == $todayyear and $self->month == $todaymonth and $thisday == $todaydate
$self->year == $todayyear
$self->month == $todaymonth
$thisday == $todaydate
Truth table0%0/4
A and B and C
A= $self->year == $todayyearB= $self->month == $todaymonthC= $thisday == $todaydate
| |||||||||||||||||||||||||||||||||||||||||||||||
| 279 | 0 | ▶ | { $thisbgcolor = $self->datecolor($thisday) || $todaycolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecolor($thisday) || $todaycolor
MC/DC0%0/2
$self->datecolor($thisday) || $todaycolor
$self->datecolor($thisday)
$todaycolor
Truth table0%0/3
A || B
A= $self->datecolor($thisday)B= $todaycolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | ▶ | $thisbordercolor = $self->datebordercolor($thisday) || $todaybordercolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datebordercolor($thisday) || $todaybordercolor
MC/DC0%0/2
$self->datebordercolor($thisday) || $todaybordercolor
$self->datebordercolor($thisday)
$todaybordercolor
Truth table0%0/3
A || B
A= $self->datebordercolor($thisday)B= $todaybordercolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 0 | ▶ | $thiscontentcolor = $self->datecontentcolor($thisday) || $todaycontentcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecontentcolor($thisday) || $todaycontentcolor
MC/DC0%0/2
$self->datecontentcolor($thisday) || $todaycontentcolor
$self->datecontentcolor($thisday)
$todaycontentcolor
Truth table0%0/3
A || B
A= $self->datecontentcolor($thisday)B= $todaycontentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | ▶ | $thiscellclass = $self->datecellclass($thisday) || $todaycellclass; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecellclass($thisday) || $todaycellclass
MC/DC0%0/2
$self->datecellclass($thisday) || $todaycellclass
$self->datecellclass($thisday)
$todaycellclass
Truth table0%0/3
A || B
A= $self->datecellclass($thisday)B= $todaycellclass
| |||||||||||||||||||||||||||||||||||||||||||||||
| 283 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | ▶ | elsif (($DAY == $_sunday_index) || ($DAY == $_saturday_index)) { $thisbgcolor = $self->datecolor($thisday) || $weekendcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$DAY == $_sunday_index or $DAY == $_saturday_index
$self->datecolor($thisday) || $weekendcolor
MC/DC0%0/2
$DAY == $_sunday_index or $DAY == $_saturday_index
$DAY == $_sunday_index
$DAY == $_saturday_index
MC/DC0%0/2
$self->datecolor($thisday) || $weekendcolor
$self->datecolor($thisday)
$weekendcolor
Truth table0%0/3
A or B
A= $DAY == $_sunday_indexB= $DAY == $_saturday_index
Truth table0%0/3
A || B
A= $self->datecolor($thisday)B= $weekendcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 285 | 0 | ▶ | $thisbordercolor = $self->datebordercolor($thisday) || $weekendbordercolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datebordercolor($thisday) || $weekendbordercolor
MC/DC0%0/2
$self->datebordercolor($thisday) || $weekendbordercolor
$self->datebordercolor($thisday)
$weekendbordercolor
Truth table0%0/3
A || B
A= $self->datebordercolor($thisday)B= $weekendbordercolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 286 | 0 | ▶ | $thiscontentcolor = $self->datecontentcolor($thisday) || $weekendcontentcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecontentcolor($thisday) || $weekendcontentcolor
MC/DC0%0/2
$self->datecontentcolor($thisday) || $weekendcontentcolor
$self->datecontentcolor($thisday)
$weekendcontentcolor
Truth table0%0/3
A || B
A= $self->datecontentcolor($thisday)B= $weekendcontentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | ▶ | $thiscellclass = $self->datecellclass($thisday) || $weekendcellclass; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecellclass($thisday) || $weekendcellclass
MC/DC0%0/2
$self->datecellclass($thisday) || $weekendcellclass
$self->datecellclass($thisday)
$weekendcellclass
Truth table0%0/3
A || B
A= $self->datecellclass($thisday)B= $weekendcellclass
| |||||||||||||||||||||||||||||||||||||||||||||||
| 288 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 289 | 0 | ▶ | else { $thisbgcolor = $self->datecolor($thisday) || $weekdaycolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecolor($thisday) || $weekdaycolor
MC/DC0%0/2
$self->datecolor($thisday) || $weekdaycolor
$self->datecolor($thisday)
$weekdaycolor
Truth table0%0/3
A || B
A= $self->datecolor($thisday)B= $weekdaycolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | ▶ | $thisbordercolor = $self->datebordercolor($thisday) || $weekdaybordercolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datebordercolor($thisday) || $weekdaybordercolor
MC/DC0%0/2
$self->datebordercolor($thisday) || $weekdaybordercolor
$self->datebordercolor($thisday)
$weekdaybordercolor
Truth table0%0/3
A || B
A= $self->datebordercolor($thisday)B= $weekdaybordercolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 0 | ▶ | $thiscontentcolor = $self->datecontentcolor($thisday) || $weekdaycontentcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecontentcolor($thisday) || $weekdaycontentcolor
MC/DC0%0/2
$self->datecontentcolor($thisday) || $weekdaycontentcolor
$self->datecontentcolor($thisday)
$weekdaycontentcolor
Truth table0%0/3
A || B
A= $self->datecontentcolor($thisday)B= $weekdaycontentcolor
| |||||||||||||||||||||||||||||||||||||||||||||||
| 292 | 0 | ▶ | $thiscellclass = $self->datecellclass($thisday) || $weekdaycellclass; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$self->datecellclass($thisday) || $weekdaycellclass
MC/DC0%0/2
$self->datecellclass($thisday) || $weekdaycellclass
$self->datecellclass($thisday)
$weekdaycellclass
Truth table0%0/3
A || B
A= $self->datecellclass($thisday)B= $weekdaycellclass
| |||||||||||||||||||||||||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||||||||||
| 295 | # Done with this cell - push it into the table | ||||||||||||||||||||||||||||||||||||||||||||||
| 296 | 0 | $html .= "<td"; | |||||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | ▶ | $html .= " nowrap" if $nowrap; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 298 | 0 | ▶ | $html .= " class=\"$thiscellclass\"" if defined $thiscellclass; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | ▶ | $html .= " height=\"$cellheight\"" if defined $cellheight; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | ▶ | $html .= " width=\"$cellwidth\"" if defined $cellwidth; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | ▶ | $html .= " valign=\"$vcellalignment\"" if defined $vcellalignment; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | ▶ | $html .= " align=\"$cellalignment\"" if defined $cellalignment; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 0 | ▶ | $html .= " bgcolor=\"$thisbgcolor\"" if defined $thisbgcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | ▶ | $html .= " bordercolor=\"$thisbordercolor\"" if defined $thisbordercolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | $html .= ">"; | |||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | ▶ | $html .= "<font" if (defined $thiscontentcolor || | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $thiscontentcolor or defined $contentfontsize
MC/DC0%0/2
defined $thiscontentcolor or defined $contentfontsize
defined $thiscontentcolor
defined $contentfontsize
Truth table0%0/3
A or B
A= defined $thiscontentcolorB= defined $contentfontsize
| |||||||||||||||||||||||||||||||||||||||||||||||
| 307 | defined $contentfontsize); | ||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | ▶ | $html .= " color=\"$thiscontentcolor\"" if defined $thiscontentcolor; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | ▶ | $html .= " size=\"$contentfontsize\"" if defined $contentfontsize; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | ▶ | $html .= ">" if (defined $thiscontentcolor || | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $thiscontentcolor or defined $contentfontsize
MC/DC0%0/2
defined $thiscontentcolor or defined $contentfontsize
defined $thiscontentcolor
defined $contentfontsize
Truth table0%0/3
A or B
A= defined $thiscontentcolorB= defined $contentfontsize
| |||||||||||||||||||||||||||||||||||||||||||||||
| 311 | defined $contentfontsize); | ||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | $html .= $thiscontent; | |||||||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | ▶ | $html .= "</font>" if (defined $thiscontentcolor || | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $thiscontentcolor or defined $contentfontsize
MC/DC0%0/2
defined $thiscontentcolor or defined $contentfontsize
defined $thiscontentcolor
defined $contentfontsize
Truth table0%0/3
A or B
A= defined $thiscontentcolorB= defined $contentfontsize
| |||||||||||||||||||||||||||||||||||||||||||||||
| 314 | defined $contentfontsize); | ||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | $html .= "</td>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 316 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 317 | 0 | $html .= "</tr>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 318 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 319 | 0 | $html .= "</table>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||||||
| 321 | # if sharpborders, we need to break out of the enclosing table cell | ||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 0 | ▶ | if ($sharpborders) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 323 | 0 | $html .= "</td>\n</tr>\n</table>\n"; | |||||||||||||||||||||||||||||||||||||||||||||
| 324 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||||||||||||||||||||
| 326 | 0 | return $html; | |||||||||||||||||||||||||||||||||||||||||||||
| 327 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||||||||||
| 330 | |||||||||||||||||||||||||||||||||||||||||||||||
| 331 | sub sunday { | ||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sunday: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 334 | 0 | ▶ | $self->{'sunday'} = $newvalue if defined($newvalue); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 335 | 0 | return $self->{'sunday'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 336 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||||||||||||||||
| 338 | sub saturday { | ||||||||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
saturday: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 341 | 0 | ▶ | $self->{'saturday'} = $newvalue if defined($newvalue); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 342 | 0 | return $self->{'saturday'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 343 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||||||||||
| 345 | sub weekdays { | ||||||||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdays: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 347 | 0 | my @days = @_; | |||||||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | ▶ | $self->{'weekdays'} = \@days if (scalar(@days)==5); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 349 | 0 | return @{$self->{'weekdays'}}; | |||||||||||||||||||||||||||||||||||||||||||||
| 350 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||||||||||||||||||||
| 352 | sub getdatehref { | ||||||||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getdatehref: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 355 | 0 | return $self->{'href'}->{$dates[0]}; | |||||||||||||||||||||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||||||
| 358 | sub setdatehref { | ||||||||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
setdatehref: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | ▶ | my $datehref = shift || ''; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || ''
MC/DC0%0/1
shift() || ''
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 362 | |||||||||||||||||||||||||||||||||||||||||||||||
| 363 | 0 | foreach my $date (@dates) { | |||||||||||||||||||||||||||||||||||||||||||||
| 364 | 0 | ▶ | $self->{'href'}->{$date} = $datehref if defined($self->{'href'}->{$date}); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 365 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 366 | |||||||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | return(1); | |||||||||||||||||||||||||||||||||||||||||||||
| 368 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||||||||||||||||
| 370 | sub weekendcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekendcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekendcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | return $self->{'weekendcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 375 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||||||||||||||||
| 377 | sub weekendheadercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekendheadercolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 379 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 380 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekendheadercolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 381 | 0 | return $self->{'weekendheadercolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 382 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||||||||||||||||||||
| 384 | sub weekdayheadercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 385 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdayheadercolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 387 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekdayheadercolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | return $self->{'weekdayheadercolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 389 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||||||||||||||||
| 391 | sub weekdaycolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 392 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdaycolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 393 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekdaycolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 395 | 0 | return $self->{'weekdaycolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 396 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||||||||||||||||||||
| 398 | sub headercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
headercolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 400 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | ▶ | if (defined($newvalue)) { $self->{'headercolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 402 | 0 | return $self->{'headercolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 403 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 404 | |||||||||||||||||||||||||||||||||||||||||||||||
| 405 | sub bgcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 406 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
bgcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 407 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 408 | 0 | ▶ | if (defined($newvalue)) { $self->{'bgcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 0 | return $self->{'bgcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 410 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||||||||||||||||||||
| 412 | sub todaycolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
todaycolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 415 | 0 | ▶ | if (defined($newvalue)) { $self->{'todaycolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 416 | 0 | return $self->{'todaycolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 417 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||||||||
| 419 | sub bordercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 420 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
bordercolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 421 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 422 | 0 | ▶ | if (defined($newvalue)) { $self->{'bordercolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | return $self->{'bordercolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 424 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 425 | |||||||||||||||||||||||||||||||||||||||||||||||
| 426 | sub highlightbordercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 427 | 0 | ▶ | my $self=shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
highlightbordercolor: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 428 | 0 | ▶ | $self->{"highlightbordercolorhighlight"}=shift if @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 429 | $self->{"highlightbordercolorhighlight"}="#2E2E2E" | ||||||||||||||||||||||||||||||||||||||||||||||
| 430 | 0 | ▶ | unless defined($self->{"highlightbordercolorhighlight"}); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 0 | return $self->{"highlightbordercolorhighlight"}; | |||||||||||||||||||||||||||||||||||||||||||||
| 432 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 433 | |||||||||||||||||||||||||||||||||||||||||||||||
| 434 | sub weekdaybordercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdaybordercolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekdaybordercolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 438 | 0 | return $self->{'weekdaybordercolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 439 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 440 | |||||||||||||||||||||||||||||||||||||||||||||||
| 441 | sub weekendbordercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 442 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekendbordercolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 443 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 444 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekendbordercolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 445 | 0 | return $self->{'weekendbordercolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 446 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 447 | |||||||||||||||||||||||||||||||||||||||||||||||
| 448 | sub todaybordercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
todaybordercolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 450 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 451 | 0 | ▶ | if (defined($newvalue)) { $self->{'todaybordercolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 452 | 0 | return $self->{'todaybordercolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 453 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 454 | |||||||||||||||||||||||||||||||||||||||||||||||
| 455 | sub contentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 456 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
contentcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 457 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 458 | 0 | ▶ | if (defined($newvalue)) { $self->{'contentcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 459 | 0 | return $self->{'contentcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 460 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 461 | |||||||||||||||||||||||||||||||||||||||||||||||
| 462 | sub highlightcontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 463 | 0 | ▶ | my $self=shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
highlightcontentcolor: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 464 | 0 | ▶ | $self->{"highlightcontentcolor"}=shift if @_; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 465 | $self->{"highlightcontentcolor"}="#FEFEE2" | ||||||||||||||||||||||||||||||||||||||||||||||
| 466 | 0 | ▶ | unless defined $self->{"highlightcontentcolor"}; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 467 | 0 | return $self->{"highlightcontentcolor"}; | |||||||||||||||||||||||||||||||||||||||||||||
| 468 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 469 | |||||||||||||||||||||||||||||||||||||||||||||||
| 470 | sub headercontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 471 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
headercontentcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 472 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 473 | 0 | ▶ | if (defined($newvalue)) { $self->{'headercontentcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 474 | 0 | return $self->{'headercontentcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 475 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 476 | |||||||||||||||||||||||||||||||||||||||||||||||
| 477 | sub weekdayheadercontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 478 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdayheadercontentcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 479 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 480 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekdayheadercontentcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 481 | 0 | return $self->{'weekdayheadercontentcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 482 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 483 | |||||||||||||||||||||||||||||||||||||||||||||||
| 484 | sub weekendheadercontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 485 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekendheadercontentcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 486 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 487 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekendheadercontentcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 488 | 0 | return $self->{'weekendheadercontentcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 489 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 490 | |||||||||||||||||||||||||||||||||||||||||||||||
| 491 | sub weekdaycontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 492 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdaycontentcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 493 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 494 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekdaycontentcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 495 | 0 | return $self->{'weekdaycontentcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 496 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 497 | |||||||||||||||||||||||||||||||||||||||||||||||
| 498 | sub weekendcontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 499 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekendcontentcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 500 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 501 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekendcontentcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 502 | 0 | return $self->{'weekendcontentcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 503 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 504 | |||||||||||||||||||||||||||||||||||||||||||||||
| 505 | sub todaycontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 506 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
todaycontentcolor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 507 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 508 | 0 | ▶ | if (defined($newvalue)) { $self->{'todaycontentcolor'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 509 | 0 | return $self->{'todaycontentcolor'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 510 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 511 | |||||||||||||||||||||||||||||||||||||||||||||||
| 512 | sub datecolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 513 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
datecolor: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 514 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 515 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 516 | |||||||||||||||||||||||||||||||||||||||||||||||
| 517 | 0 | ▶ | if (defined($newvalue)) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 518 | 0 | foreach my $date (@dates) { | |||||||||||||||||||||||||||||||||||||||||||||
| 519 | 0 | ▶ | $self->{'datecolor'}->{$date} = $newvalue if defined($self->{'datecolor'}->{$date}); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 520 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 521 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 522 | |||||||||||||||||||||||||||||||||||||||||||||||
| 523 | 0 | return $self->{'datecolor'}->{$dates[0]}; | |||||||||||||||||||||||||||||||||||||||||||||
| 524 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 525 | |||||||||||||||||||||||||||||||||||||||||||||||
| 526 | sub datebordercolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 527 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
datebordercolor: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 528 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 529 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 530 | |||||||||||||||||||||||||||||||||||||||||||||||
| 531 | 0 | ▶ | if (defined($newvalue)) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 532 | 0 | foreach my $date (@dates) { | |||||||||||||||||||||||||||||||||||||||||||||
| 533 | 0 | ▶ | $self->{'datebordercolor'}->{$date} = $newvalue if defined($self->{'datebordercolor'}->{$date}); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 534 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 535 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 536 | |||||||||||||||||||||||||||||||||||||||||||||||
| 537 | 0 | return $self->{'datebordercolor'}->{$dates[0]}; | |||||||||||||||||||||||||||||||||||||||||||||
| 538 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 539 | |||||||||||||||||||||||||||||||||||||||||||||||
| 540 | sub datecontentcolor { | ||||||||||||||||||||||||||||||||||||||||||||||
| 541 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
datecontentcolor: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 542 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 543 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 544 | |||||||||||||||||||||||||||||||||||||||||||||||
| 545 | 0 | ▶ | if (defined($newvalue)) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 546 | 0 | foreach my $date (@dates) { | |||||||||||||||||||||||||||||||||||||||||||||
| 547 | 0 | ▶ | $self->{'datecontentcolor'}->{$date} = $newvalue if defined($self->{'datecontentcolor'}->{$date}); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 548 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 549 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 550 | |||||||||||||||||||||||||||||||||||||||||||||||
| 551 | 0 | return $self->{'datecontentcolor'}->{$dates[0]}; | |||||||||||||||||||||||||||||||||||||||||||||
| 552 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 553 | |||||||||||||||||||||||||||||||||||||||||||||||
| 554 | sub highlight { | ||||||||||||||||||||||||||||||||||||||||||||||
| 555 | 0 | ▶ | my $self=shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
highlight: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 556 | 0 | my @day=@_; | |||||||||||||||||||||||||||||||||||||||||||||
| 557 | 0 | foreach my $day (@day) { | |||||||||||||||||||||||||||||||||||||||||||||
| 558 | 0 | $self->datebordercolor($day, $self->highlightbordercolor); | |||||||||||||||||||||||||||||||||||||||||||||
| 559 | 0 | $self->datecolor($day, $self->highlightcontentcolor); | |||||||||||||||||||||||||||||||||||||||||||||
| 560 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 561 | 0 | return(1); | |||||||||||||||||||||||||||||||||||||||||||||
| 562 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 563 | |||||||||||||||||||||||||||||||||||||||||||||||
| 564 | sub getcontent { | ||||||||||||||||||||||||||||||||||||||||||||||
| 565 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getcontent: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 566 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 567 | 0 | return $self->{'content'}->{$dates[0]}; | |||||||||||||||||||||||||||||||||||||||||||||
| 568 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 569 | |||||||||||||||||||||||||||||||||||||||||||||||
| 570 | sub setcontent { | ||||||||||||||||||||||||||||||||||||||||||||||
| 571 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
setcontent: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 572 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 573 | 0 | ▶ | my $newcontent = shift || ''; | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || ''
MC/DC0%0/1
shift() || ''
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 574 | |||||||||||||||||||||||||||||||||||||||||||||||
| 575 | 0 | foreach my $date (@dates) { | |||||||||||||||||||||||||||||||||||||||||||||
| 576 | 0 | ▶ | $self->{'content'}->{$date} = $newcontent if defined($self->{'content'}->{$date}); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 577 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 578 | |||||||||||||||||||||||||||||||||||||||||||||||
| 579 | 0 | return(1); | |||||||||||||||||||||||||||||||||||||||||||||
| 580 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 581 | |||||||||||||||||||||||||||||||||||||||||||||||
| 582 | sub addcontent { | ||||||||||||||||||||||||||||||||||||||||||||||
| 583 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
addcontent: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 584 | 0 | ▶ | my @dates = $self->_date_string_to_numeric(shift); return() unless @dates; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 585 | 0 | ▶ | my $newcontent = shift || return(); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || (return ())
MC/DC0%0/1
shift() || (return ())
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 586 | |||||||||||||||||||||||||||||||||||||||||||||||
| 587 | 0 | foreach my $date (@dates) { | |||||||||||||||||||||||||||||||||||||||||||||
| 588 | 0 | ▶ | $self->{'content'}->{$date} .= $newcontent if defined($self->{'content'}->{$date}); | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 589 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 590 | |||||||||||||||||||||||||||||||||||||||||||||||
| 591 | 0 | return(1); | |||||||||||||||||||||||||||||||||||||||||||||
| 592 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 593 | |||||||||||||||||||||||||||||||||||||||||||||||
| 594 | sub border { | ||||||||||||||||||||||||||||||||||||||||||||||
| 595 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
border: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 596 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 597 | 0 | ▶ | if (defined($newvalue)) { $self->{'border'} = int($newvalue); } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 598 | 0 | return $self->{'border'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 599 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 600 | |||||||||||||||||||||||||||||||||||||||||||||||
| 601 | |||||||||||||||||||||||||||||||||||||||||||||||
| 602 | sub cellpadding { | ||||||||||||||||||||||||||||||||||||||||||||||
| 603 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cellpadding: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 604 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 605 | 0 | ▶ | if (defined($newvalue)) { $self->{'cellpadding'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 606 | 0 | return $self->{'cellpadding'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 607 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 608 | |||||||||||||||||||||||||||||||||||||||||||||||
| 609 | sub cellspacing { | ||||||||||||||||||||||||||||||||||||||||||||||
| 610 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cellspacing: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 611 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 612 | 0 | ▶ | if (defined($newvalue)) { $self->{'cellspacing'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 613 | 0 | return $self->{'cellspacing'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 614 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 615 | |||||||||||||||||||||||||||||||||||||||||||||||
| 616 | sub width { | ||||||||||||||||||||||||||||||||||||||||||||||
| 617 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
width: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 618 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 619 | 0 | ▶ | if (defined($newvalue)) { $self->{'width'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 620 | 0 | return $self->{'width'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 621 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 622 | |||||||||||||||||||||||||||||||||||||||||||||||
| 623 | sub showdatenumbers { | ||||||||||||||||||||||||||||||||||||||||||||||
| 624 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
showdatenumbers: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 625 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 626 | 0 | ▶ | if (defined($newvalue)) { $self->{'showdatenumbers'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 627 | 0 | return $self->{'showdatenumbers'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 628 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 629 | sub showweekdayheaders { | ||||||||||||||||||||||||||||||||||||||||||||||
| 630 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
showweekdayheaders: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 631 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 632 | 0 | ▶ | if (defined($newvalue)) { $self->{'showweekdayheaders'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 633 | 0 | return $self->{'showweekdayheaders'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 634 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 635 | |||||||||||||||||||||||||||||||||||||||||||||||
| 636 | sub cellalignment { | ||||||||||||||||||||||||||||||||||||||||||||||
| 637 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cellalignment: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 638 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 639 | 0 | ▶ | if (defined($newvalue)) { $self->{'cellalignment'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 640 | 0 | return $self->{'cellalignment'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 641 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 642 | |||||||||||||||||||||||||||||||||||||||||||||||
| 643 | sub vcellalignment { | ||||||||||||||||||||||||||||||||||||||||||||||
| 644 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
vcellalignment: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 645 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 646 | 0 | ▶ | if (defined($newvalue)) { $self->{'vcellalignment'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 647 | 0 | return $self->{'vcellalignment'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 648 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 649 | |||||||||||||||||||||||||||||||||||||||||||||||
| 650 | sub contentfontsize { | ||||||||||||||||||||||||||||||||||||||||||||||
| 651 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
contentfontsize: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 652 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 653 | 0 | ▶ | if (defined($newvalue)) { $self->{'contentfontsize'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 654 | 0 | return $self->{'contentfontsize'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 655 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 656 | |||||||||||||||||||||||||||||||||||||||||||||||
| 657 | sub weekdayheadersbig { | ||||||||||||||||||||||||||||||||||||||||||||||
| 658 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdayheadersbig: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 659 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 660 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekdayheadersbig'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 661 | 0 | return $self->{'weekdayheadersbig'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 662 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 663 | |||||||||||||||||||||||||||||||||||||||||||||||
| 664 | sub year { | ||||||||||||||||||||||||||||||||||||||||||||||
| 665 | 3 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
year: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 666 | 3 | return $self->{'year'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 667 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 668 | |||||||||||||||||||||||||||||||||||||||||||||||
| 669 | sub month { | ||||||||||||||||||||||||||||||||||||||||||||||
| 670 | 3 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
month: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 671 | 3 | return $self->{'month'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 672 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 673 | |||||||||||||||||||||||||||||||||||||||||||||||
| 674 | sub monthname { | ||||||||||||||||||||||||||||||||||||||||||||||
| 675 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
monthname: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 676 | 0 | return $self->{'monthname'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 677 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 678 | |||||||||||||||||||||||||||||||||||||||||||||||
| 679 | sub today_year { | ||||||||||||||||||||||||||||||||||||||||||||||
| 680 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
today_year: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 681 | 0 | return $self->{'today_year'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 682 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 683 | |||||||||||||||||||||||||||||||||||||||||||||||
| 684 | sub today_month { | ||||||||||||||||||||||||||||||||||||||||||||||
| 685 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
today_month: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 686 | 0 | return $self->{'today_month'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 687 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 688 | |||||||||||||||||||||||||||||||||||||||||||||||
| 689 | sub today_date { | ||||||||||||||||||||||||||||||||||||||||||||||
| 690 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
today_date: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 691 | 0 | return $self->{'today_date'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 692 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 693 | |||||||||||||||||||||||||||||||||||||||||||||||
| 694 | |||||||||||||||||||||||||||||||||||||||||||||||
| 695 | sub header { | ||||||||||||||||||||||||||||||||||||||||||||||
| 696 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
header: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 697 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 698 | 0 | ▶ | if (defined($newvalue)) { $self->{'header'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 699 | 0 | return $self->{'header'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 700 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 701 | |||||||||||||||||||||||||||||||||||||||||||||||
| 702 | sub nowrap { | ||||||||||||||||||||||||||||||||||||||||||||||
| 703 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
nowrap: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 704 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 705 | 0 | ▶ | if (defined($newvalue)) { $self->{'nowrap'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 706 | 0 | return $self->{'nowrap'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 707 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 708 | |||||||||||||||||||||||||||||||||||||||||||||||
| 709 | sub sharpborders { | ||||||||||||||||||||||||||||||||||||||||||||||
| 710 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sharpborders: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 711 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 712 | 0 | ▶ | if (defined($newvalue)) { $self->{'sharpborders'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 713 | 0 | return $self->{'sharpborders'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 714 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 715 | |||||||||||||||||||||||||||||||||||||||||||||||
| 716 | sub cellheight { | ||||||||||||||||||||||||||||||||||||||||||||||
| 717 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cellheight: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 718 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 719 | 0 | ▶ | if (defined($newvalue)) { $self->{'cellheight'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 720 | 0 | return $self->{'cellheight'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 721 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 722 | |||||||||||||||||||||||||||||||||||||||||||||||
| 723 | sub cellclass { | ||||||||||||||||||||||||||||||||||||||||||||||
| 724 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cellclass: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 725 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 726 | 0 | ▶ | if (defined($newvalue)) { $self->{'cellclass'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 727 | 0 | return $self->{'cellclass'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 728 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 729 | |||||||||||||||||||||||||||||||||||||||||||||||
| 730 | sub tableclass { | ||||||||||||||||||||||||||||||||||||||||||||||
| 731 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
tableclass: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 732 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 733 | 0 | ▶ | if (defined($newvalue)) { $self->{'tableclass'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 734 | 0 | return $self->{'tableclass'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 735 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 736 | |||||||||||||||||||||||||||||||||||||||||||||||
| 737 | sub weekdaycellclass { | ||||||||||||||||||||||||||||||||||||||||||||||
| 738 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekdaycellclass: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 739 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 740 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekdaycellclass'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 741 | 0 | return $self->{'weekdaycellclass'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 742 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 743 | |||||||||||||||||||||||||||||||||||||||||||||||
| 744 | sub weekendcellclass { | ||||||||||||||||||||||||||||||||||||||||||||||
| 745 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekendcellclass: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 746 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 747 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekendcellclass'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 748 | 0 | return $self->{'weekendcellclass'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 749 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 750 | |||||||||||||||||||||||||||||||||||||||||||||||
| 751 | sub todaycellclass { | ||||||||||||||||||||||||||||||||||||||||||||||
| 752 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
todaycellclass: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 753 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 754 | 0 | ▶ | if (defined($newvalue)) { $self->{'todaycellclass'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 755 | 0 | return $self->{'todaycellclass'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 756 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 757 | |||||||||||||||||||||||||||||||||||||||||||||||
| 758 | sub datecellclass { | ||||||||||||||||||||||||||||||||||||||||||||||
| 759 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
datecellclass: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 760 | 0 | ▶ | my $date = lc(shift) || return(); $date = int($date) if $date =~ m/^[\d\.]+$/; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
lc shift() || (return ())
MC/DC0%0/1
lc shift() || (return ())
lc shift()
Truth table0%0/2
A
A= lc shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 761 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 762 | 0 | ▶ | if (defined($newvalue)) { $self->{'datecellclass'}->{$date} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 763 | 0 | return $self->{'datecellclass'}->{$date}; | |||||||||||||||||||||||||||||||||||||||||||||
| 764 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 765 | |||||||||||||||||||||||||||||||||||||||||||||||
| 766 | sub headerclass { | ||||||||||||||||||||||||||||||||||||||||||||||
| 767 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
headerclass: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 768 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 769 | 0 | ▶ | if (defined($newvalue)) { $self->{'headerclass'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 770 | 0 | return $self->{'headerclass'}; | |||||||||||||||||||||||||||||||||||||||||||||
| 771 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 772 | |||||||||||||||||||||||||||||||||||||||||||||||
| 773 | sub weekstartsonmonday { | ||||||||||||||||||||||||||||||||||||||||||||||
| 774 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
weekstartsonmonday: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 775 | 0 | my $newvalue = shift; | |||||||||||||||||||||||||||||||||||||||||||||
| 776 | 0 | ▶ | if (defined($newvalue)) { $self->{'weekstartsonmonday'} = $newvalue; } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 777 | 0 | ▶ | return $self->{'weekstartsonmonday'} ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 778 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 779 | |||||||||||||||||||||||||||||||||||||||||||||||
| 780 | sub Days_in_Month { | ||||||||||||||||||||||||||||||||||||||||||||||
| 781 | 3 | ▶ | my $self=shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
Days_in_Month: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 782 | 3 | return Date::Calc::Days_in_Month($self->year, $self->month); | |||||||||||||||||||||||||||||||||||||||||||||
| 783 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 784 | |||||||||||||||||||||||||||||||||||||||||||||||
| 785 | ### the following methods are internal-use-only methods | ||||||||||||||||||||||||||||||||||||||||||||||
| 786 | |||||||||||||||||||||||||||||||||||||||||||||||
| 787 | # _date_string_to_numeric() takes a date string (e.g. 5, 'wednesdays', or '3friday') | ||||||||||||||||||||||||||||||||||||||||||||||
| 788 | # and returns the corresponding numeric date. For numerics, this sounds meaningless, | ||||||||||||||||||||||||||||||||||||||||||||||
| 789 | # but for the strings it's useful to have this all in one place. | ||||||||||||||||||||||||||||||||||||||||||||||
| 790 | # If it's a plural weekday (e.g. 'sundays') then an array of numeric dates is returned. | ||||||||||||||||||||||||||||||||||||||||||||||
| 791 | sub _date_string_to_numeric { | ||||||||||||||||||||||||||||||||||||||||||||||
| 792 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_date_string_to_numeric: not called CC=7 SCAR=40.3
| |||||||||||||||||||||||||||||||||||||||||||||||
| 793 | 0 | ▶ | my $date = shift || return (); | ||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift() || (return ())
MC/DC0%0/1
shift() || (return ())
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||||||||||||||||||||
| 794 | |||||||||||||||||||||||||||||||||||||||||||||||
| 795 | 0 | my($which,$weekday); | |||||||||||||||||||||||||||||||||||||||||||||
| 796 | 0 | ▶ | if ($date =~ m/^\d\.*\d*$/) { # first and easiest, simple numerics | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||
| 797 | 0 | return int($date); | |||||||||||||||||||||||||||||||||||||||||||||
| 798 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 799 | elsif (($which,$weekday) = ($date =~ m/^(\d)([a-zA-Z]+)$/)) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 800 | 0 | my($y,$m,$d) = Date::Calc::Nth_Weekday_of_Month_Year($self->year(),$self->month(),Date::Calc::Decode_Day_of_Week($weekday),$which); | |||||||||||||||||||||||||||||||||||||||||||||
| 801 | 0 | return $d; | |||||||||||||||||||||||||||||||||||||||||||||
| 802 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 803 | elsif (($weekday) = ($date =~ m/^(\w+)s$/i)) { | ||||||||||||||||||||||||||||||||||||||||||||||
| 804 | 0 | $weekday = Date::Calc::Decode_Day_of_Week($weekday); # now it's the numeric weekday | |||||||||||||||||||||||||||||||||||||||||||||
| 805 | 0 | my @dates; | |||||||||||||||||||||||||||||||||||||||||||||
| 806 | 0 | foreach my $which (1..5) { | |||||||||||||||||||||||||||||||||||||||||||||
| 807 | 0 | my $thisdate = Date::Calc::Nth_Weekday_of_Month_Year($self->year(),$self->month(),$weekday,$which); | |||||||||||||||||||||||||||||||||||||||||||||
| 808 | 0 | ▶ | push(@dates,$thisdate) if $thisdate; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 809 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 810 | 0 | return @dates; | |||||||||||||||||||||||||||||||||||||||||||||
| 811 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 812 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 813 | |||||||||||||||||||||||||||||||||||||||||||||||
| 814 | |||||||||||||||||||||||||||||||||||||||||||||||
| 815 | |||||||||||||||||||||||||||||||||||||||||||||||
| 816 | __END__; | ||||||||||||||||||||||||||||||||||||||||||||||