Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Business Date Range Only

by poj (Prior)
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); }

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2017-07-27 17:58 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (419 votes). Check out past polls.