Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How to find business days?

by adrianh (Chancellor)
on Feb 23, 2004 at 23:16 UTC ( [id://331254]=note: print w/replies, xml ) Need Help??


in reply to How to find business days?

The wonderful DateTime modules are your friend.

use DateTime; use DateTime::Event::Recurrence; my $working_days = DateTime::Event::Recurrence->weekly( days => [1 .. +5] ); my $start = DateTime->new(year => 2004, month => 2, day => 1 ); my $end = DateTime->new(year => 2004, month => 2, day => 10 ); my $num_days = $working_days->as_list( start => $start, end => $end ); print $num_days;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-11-12 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    chatterbot is...






    Results (39 votes). Check out past polls.