Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: week days in a given date range

by shemp (Deacon)
on Oct 20, 2005 at 22:07 UTC ( [id://501828]=note: print w/replies, xml ) Need Help??


in reply to week days in a given date range

Use the Date::Calc CPAN module. The function Day_of_Week() gives a numeric value for the day of the week, i.e. monday is 1, etc. Use that on the mimimum date in your range. Also use the Add_Delta_Days() function to keep adding one day to the initial day until you get to the end of the date range. Keep track of the dates that are each weekday. You'll have to do some playing around to get everything in the format you desire. Perhaps i'll post a code solution when i get home from work.

I use the most powerful debugger available: print!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found