good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Calculating next business day (weekends/holidays taken into account)by vxp (Pilgrim) |
on Jun 24, 2009 at 20:04 UTC ( [id://774503]=perlquestion: print w/replies, xml ) | Need Help?? |
vxp has asked for the wisdom of the Perl Monks concerning the following question: The script I am writing is supposed to return the next business day (there's a list of holidays the script knows about, and it also calculates whether or not it's the weekend). I haven't had any problems getting to this point (finding out whether a date passed to the script is one of the known holidays or a weekend) but now I'm stuck at determining the next business day. if the date passed to the script is NOT a weekend date, and it's NOT listed in one of the hashes I'm using as a holiday, then the script is supposed to figure out the next business day (next day that is not the weekend, and does not have a holiday associated with it) everything's wrriten and works, except for my get_next_business_day() sub. I'm drawing a blank right now. May be it's becaused it's been a long day :) Was wondering if any of you guys would have comments / suggestions / solutions ?
Back to
Seekers of Perl Wisdom
|
|