In hopes of improving the relevance of year to year comparisons I would like to correct for the fact that the data last year fell on Easter, Labor Day, or whatever. What is the easiest way to programatically determine this information? Are any solutions known to account for international holidays? I could scrape a site like this one but I feel like it is in violation of their terms of service.
-
Have a look at http://blogs.msdn.com/michkap/archive/2006/12/26/1364585.aspx to get a bit of background on the issues you might encounter. With 200 countries or so, and only 365 days, almost every day is a holiday :) – MSalters Apr 10 '09 at 10:55
-
This kind of Question may be posted on the sister site: [*Software Recommendations Stack Exchange*](https://softwarerecs.stackexchange.com/) – Basil Bourque Jan 26 '18 at 06:52
2 Answers
In the Java world the site you mentioned does comport an API, Instant Holiday Connection, which could be a good solution (better than screen scraping).
The Light Development Holiday Client API is a Java class library to seamlessly integrate arbitrary other applications with the World Holiday Calendar Service to make them aware of special observation days around the globe.
However, the free version only give access to last year Holidays...
Another (more public) database would be Earth Calendar, free but with no visible API (back to screen scraping again)
time and date.com does appear to have also all Holidays for all countries (with again no visible API).
They do have a fairly complete list of Holidays though

- 1,262,500
- 529
- 4,410
- 5,250
-
Similar: [A good Business calendar library in Java?](https://stackoverflow.com/q/1044921/642706) (now closed as off-topic in Stack Overflow) – Basil Bourque Jan 26 '18 at 06:54
One approach is to let your users input national holidays that they know about and affect their work. You have to be careful though, at one of the IBs I worked for we noticed that one of the traders had entered National Kebab Day on his trading system as a Turkish holiday.