Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The old way you had to do it was Time::Local (which you are using) and localtime. Convert back and forth between date representations and epoch time.
Create a constant that contains the value of a days worth of seconds (60 * 60 * 24). When you need to increment a day get the epoch and add a days worth of seconds, then convert that back to your date. Once you have that date, check if that new date is a business day or not. I would use noon as your HH:MM:SS when you convert from date to epoch. This is a lot more work and you have to deal with localtime's 0 and 1 based ranges. Break everything down to small manageable subs. One for date to epoch and the other way.
grep One dead unjugged rabbit fish later... In reply to Re^5: Calculating next business day (weekends/holidays taken into account)
by grep
|
|