diff options
Diffstat (limited to 'rhimport-sm')
-rwxr-xr-x | rhimport-sm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rhimport-sm b/rhimport-sm index bbddbe5..12ed8e2 100755 --- a/rhimport-sm +++ b/rhimport-sm @@ -84,8 +84,8 @@ if($curweek < 1 || $curweek > 4) { my @today = Date::Calc::Today(); my $dow = Date::Calc::Day_of_Week(@today); -if(($curweek != 1 && $curweek != 4) || - ($curweek == 1 && $dow > 3) || +if(($curweek != 1 && $curweek != 4) || + ($curweek == 1 && $dow > 3) || ($curweek == 4 && $dow <= 3)) { print "File won't be available by now!\n"; $dbh->disconnect(); @@ -95,7 +95,7 @@ print "today: " . Date::Calc::Date_to_Text(@today) . "\n"; my @import_date = Date::Calc::Standard_to_Business(@today); $import_date[2] = 3; -@import_date = Date::Calc::Business_to_Standard($import_date[0], $import_date[1], $import_date[2]); +@import_date = Date::Calc::Business_to_Standard(@import_date); if($curweek == 4) { @import_date = Date::Calc::Add_Delta_Days(@import_date, 7); } @@ -114,9 +114,9 @@ if(Date::Calc::Delta_Days(@broadcast_date, @today) <= 0) { exit 0; } -my $id = sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]); -my $bd = sprintf("%04d-%02d-%02d", $broadcast_date[0], $broadcast_date[1], $broadcast_date[2]); -my $bdfile = sprintf("%04d-?%02d-?%02d", $broadcast_date[0], $broadcast_date[1], $broadcast_date[2]); +my $id = sprintf("%04d-%02d-%02d", @import_date); +my $bd = sprintf("%04d-%02d-%02d", @broadcast_date); +my $bdfile = sprintf("%04d-?%02d-?%02d", @broadcast_date); print "looking for files from $bd in RSS Feed\n"; print " -> $RSS_URL\n"; |