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.
In reply to Re^2: Yesterday Date
by Narveson
in thread Yesterday Date
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |