summaryrefslogtreecommitdiff
path: root/rhimport-sm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2013-12-18 14:45:31 (GMT)
committerChristian Pointner <equinox@helsinki.at>2013-12-18 14:45:31 (GMT)
commit937f11da7bcb8b6162d82b0bdecdccd29e826c4c (patch)
treea9403884ee2f71f9615a50f171a22918cf7c9616 /rhimport-sm
parent285dbb2350a57694102c9ac5f9fd3f744a37ac63 (diff)
cleanups
Diffstat (limited to 'rhimport-sm')
-rwxr-xr-xrhimport-sm12
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";