
11 Dec
2009
11 Dec
'09
6:43 a.m.
Colin Paul Adams wrote:
You will need to write it, as it depends upon your definition of what a business day is. This tends to be country-specific (at least).
Agreed. I'm a Haskell-newbie so I can't give the Haskell code for this, but in "pseudo-code" it would be something like this - holidays_list = ["09JAN", "06FEB", ..... ] ( This will vary depending on country ) if myday not in holidays_list and day(myday) in ["Mon", "Tue", "Wed", "Thu", "Fri"] then business_day(myday) = "Yes" else business_day(myday) = "No" Some countries have a "Holidays Act" or similar legislation which specifies the holidays for the current year and the next few years. Hope this helps.... :) - Andy