summaryrefslogtreecommitdiff
path: root/rhautoimport-ra
diff options
context:
space:
mode:
Diffstat (limited to 'rhautoimport-ra')
-rwxr-xr-xrhautoimport-ra8
1 files changed, 4 insertions, 4 deletions
diff --git a/rhautoimport-ra b/rhautoimport-ra
index a531458..aaa1e0a 100755
--- a/rhautoimport-ra
+++ b/rhautoimport-ra
@@ -67,12 +67,12 @@ $today[2] = 1;
my @broadcast_day = Date::Calc::Business_to_Standard(@today);
$today[2] = 3;
my @import_date = Date::Calc::Business_to_Standard(@today);
-my @import_date_reb = Date::Calc::Add_Delta_Days($import_date[0], $import_date[1], $import_date[2], 3);
+my @import_date_reb = Date::Calc::Add_Delta_Days(@import_date, 3);
print "day of original broadcast: " . Date::Calc::Date_to_Text(@broadcast_day) . "\n";
print "day of Radio Helsinki broadcast: " . Date::Calc::Date_to_Text(@import_date) . "\n";
print "day of Radio Helsinki rebroadcast: " . Date::Calc::Date_to_Text(@import_date_reb) . "\n";
-my $bd = sprintf("%04d-%02d-%02d", $broadcast_day[0], $broadcast_day[1], $broadcast_day[2]);
+my $bd = sprintf("%04d-%02d-%02d", @broadcast_day);
print "looking for files from $bd in RSS Feed\n";
print " -> $RSS_URL\n";
@@ -118,9 +118,9 @@ for my $entry ($feed->entries) {
my $sum_text = decode_entities($entry->content->body);
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_date), "1");
print "\n";
- rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
+ rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_date_reb), "2");
print "\n";
last;