There's more than one way to do things | |
PerlMonks |
Re: Calculating next business day (weekends/holidays taken into account)by grep (Monsignor) |
on Jun 24, 2009 at 20:18 UTC ( [id://774512]=note: print w/replies, xml ) | Need Help?? |
You need to increment the day by one and check if it's not a holiday/weekend day. But incrementing days gets hairy, so use one of the great date modules from cpan to do it. I use Date::Calc or for an OO module DateTime.
In fact converting you entire script to use DateTime for dates would be a good thing. It'll end up being far more maintainable in the long run, and looking at what you have so far not to much of a change.
grep One dead unjugged rabbit fish later...
In Section
Seekers of Perl Wisdom
|
|