Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Yesterday Date

by Narveson (Chaplain)
on Feb 05, 2008 at 15:24 UTC ( [id://666313]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://666313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found