Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: week days in a given date range

by BigLug (Chaplain)
on Oct 20, 2005 at 22:51 UTC ( [id://501834]=note: print w/replies, xml ) Need Help??


in reply to week days in a given date range

Because it's "what I do" ... here's the DateTime solution. I know you're already working in Time::Piece, so you probably want to go with the matching solution above.

use DateTime; my $start_date = new DateTime( year => 2005, month => 10, day => 1 ); my $end_date = new DateTime( year => 2005, month => 10, day => 14 ); while( $start_date <= $end_date ) { push( @{$result{ $start_date->day_name }}, $start_date->clone ); $start_date->add( days => 1 ); }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-23 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found