summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-12-03 23:57:50 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-12-03 23:57:50 (GMT)
commite0af56bcdcdd691ad09d70ec2cbd72219f70bb4e (patch)
tree93860e00330bd68799418dbe6f3058c7d5fda568
parentd2cd10c65bc4b310b0ebea3f622d67f612728de2 (diff)
fixed call to Date::Calc::Day_of_Week_to_Text()
-rwxr-xr-xutils/rhrd-schedules4
-rwxr-xr-xutils/rhrd-show4
2 files changed, 6 insertions, 2 deletions
diff --git a/utils/rhrd-schedules b/utils/rhrd-schedules
index 066a690..2b826e9 100755
--- a/utils/rhrd-schedules
+++ b/utils/rhrd-schedules
@@ -155,7 +155,9 @@ sub show__day_entry
return 1;
}
if($dow != ${$show}{'DOW'}) {
- print "WARNING: wrong day of week (PV: " . Date::Calc::Day_of_Week_to_Text($dow) . " != RD: " . Date::Calc::Day_of_Week_to_Text(${$show}{'DOW'}) . ") -- PV-id: $pvid\n";
+ my $rddowstr = "-";
+ $rddowstr = Date::Calc::Day_of_Week_to_Text(${$show}{'DOW'}) if(${$show}{'DOW'} >= 0);
+ print "WARNING: wrong day of week (PV: " . Date::Calc::Day_of_Week_to_Text($dow) . " != RD: " . $rddowstr . ") -- PV-id: $pvid\n";
return 1;
}
if($weeks[$week-1] != '1') {
diff --git a/utils/rhrd-show b/utils/rhrd-show
index dba7d8e..991e145 100755
--- a/utils/rhrd-show
+++ b/utils/rhrd-show
@@ -74,8 +74,10 @@ sub search
$show->{'DOW'} = 7 if $show->{'DOW'} == 0;
my $showtype = RHRD::utils::dropbox_param_showtype_to_string($show->{'TYPE'});
+ my $dowstr = "-";
+ $dowstr = Date::Calc::Day_of_Week_to_Text($show->{'DOW'}) if($show->{'DOW'} >= 0);
print $show->{'ID'} . ": " . $show->{'TITLE'} . ", ";
- print join(", ", $show->{'RHYTHM'}, Date::Calc::Day_of_Week_to_Text($show->{'DOW'}), $show->{'STARTTIME'}, ($show->{'LEN'} . " min"), $showtype);
+ print join(", ", $show->{'RHYTHM'}, $dowstr, $show->{'STARTTIME'}, ($show->{'LEN'} . " min"), $showtype);
print ", group: " . $show->{'GROUP'} . "\n";
}
return 0;