At Wed, 08 Apr 2009 09:07:26 +0100, Mark Rogers wrote:
Does anyone have any ideas how (from a script) I can determine whether a date is a (UK) bank holiday?
Something I can use from PHP preferred but I'm flexible.
Since the dates aren't consistent I assume I'm going to need somewhere to look the information up, but I'm not sure where, but it seems like this ought to be a fairly "standard" need. (For my application I need to allow website customers to select a delivery date, which needs to exclude bank holidays.) I'm hoping there's a standard method.
One fun solution would be writing a module which screen scapes http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_073...
Otherwise, searching for "national holiday web service" will probably be the most likely way to find a solution. I had a quick look and found one or two things. (One of them it seemed you had to pay for.) If you have HTTP client libraries (which PHP may have) and XML parsing libraries something like this would probably by quite easy to use.