in reply to Re: Yesterday Date
in thread Yesterday Date
Pay attention to the stated requirements.
How can I get yesterday's date from today's date, but making sure I don't get weekends for yesterday's date.
my @is_business_day = (0, 1 x 5, 0); SNOOZE: while (sleep 86_400) { my $wday = ( localtime )[6]; last SNOOZE if $business_day[$wday]; } my $prev_business_day_datetime = time; sleep 86_400;
This code is untested.
|
|---|