Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Business Date Range Only

by poj (Parson)
on Aug 01, 2014 at 20:31 UTC ( #1095954=note: print w/ replies, xml ) Need Help??

in reply to Business Date Range Only

I'm guessing you are not using the latest version of Date::Manip 6.46. You could try
$delta=Delta_Format(DateCalc($start_date_parsed,$end_date_pa +rsed),'',"%dt"); # changed from %dv
but if you did upgrade you could use the OO interface like this
use strict; use Date::Manip; my $start_date = '8/4/2014'; my $end_date = '8/15/2014'; print "$start_date to $end_date \n"; my $date1 = new Date::Manip::Date; my $date2 = $date1->new_date(); my $err1 = $date1->parse($start_date); my $err2 = $date2->parse($end_date); while ($date1->cmp($date2) <= 0) { print $date1->printf("%m-%d-%Y")."\n"; $date1->next_business_day(1); }
Comment on Re: Business Date Range Only
Select or Download Code
Replies are listed 'Best First'.
Re^2: Business Date Range Only
by Anonymous Monk on Aug 06, 2014 at 15:41 UTC
    Excellent solution.
    I upgraded and this did exactly what I need it to do.
    Thanks a million!!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2016-05-30 19:11 GMT
Find Nodes?
    Voting Booth?