in reply to efficient determination of in/out of hours including Bank Holidays
next if $bh_start < time; # historyIf the program ist started on a holiday (even 1 second past midnight), the routine will think it is a workday... I wanted to propose
but this doesn't work correctly, either, because time is in seconds since some 1970-01-01 UTC...... use integer; my $today = time / 86400 * 86400; # chop hours, minutes, seconds while (<DATA>) { # read bank holiday file ... next if $bh_start < $today; # history ... } ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: efficient determination of in/out of hours
by Random_Walk (Prior) on Oct 17, 2013 at 15:45 UTC | |
by soonix (Canon) on Oct 17, 2013 at 20:39 UTC | |
by Random_Walk (Prior) on Oct 18, 2013 at 05:57 UTC | |
by soonix (Canon) on Oct 18, 2013 at 10:31 UTC | |
by Random_Walk (Prior) on Oct 18, 2013 at 13:09 UTC |
In Section
Cool Uses for Perl