Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best free library or database to determine if a date is a US or international holiday?

Tags:

date

calendar

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.

like image 592
ojblass Avatar asked Apr 10 '09 06:04

ojblass


1 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

like image 138
VonC Avatar answered Sep 30 '22 15:09

VonC