summaryrefslogtreecommitdiff
path: root/rhimport-nw
diff options
context:
space:
mode:
Diffstat (limited to 'rhimport-nw')
-rwxr-xr-xrhimport-nw8
1 files changed, 5 insertions, 3 deletions
diff --git a/rhimport-nw b/rhimport-nw
index b24dfbf..12dd2df 100755
--- a/rhimport-nw
+++ b/rhimport-nw
@@ -71,13 +71,15 @@ my $to_cart = $allowed_dbs[0]->{'TO_CART'};
my @today = Date::Calc::Today();
my @import_date = @today;
-if( Date::Calc::Day_of_Week(@today) != 1 ) {
+if( Date::Calc::Day_of_Week(@today) > 3 ) {
@import_date = Date::Calc::Add_Delta_Days(@import_date, 7);
+}
+if( Date::Calc::Day_of_Week(@today) != 3 ) {
@import_date = Date::Calc::Standard_to_Business(@import_date);
- $import_date[2] = 1;
+ $import_date[2] = 3;
@import_date = Date::Calc::Business_to_Standard(@import_date);
}
-my @broadcast_day = Date::Calc::Add_Delta_Days(@import_date, -3);
+my @broadcast_day = Date::Calc::Add_Delta_Days(@import_date, -5);
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";