<p>Is there a public/government web service that I can call to find out what the national holidays are for a given year? (For the US and/or any country in the world.)</p>

<p>Edit: Does anybody have a set of formulas to calculate US holidays? (C# would be my language of choice if there is a choice.)</p>

[{'answer_id': 59937, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>No one gives that up for free (any country in the world?  Get real).  The best source is Copp Clark (I'm unaffiliated).  They provide all holidays for all countries broken down by financial market, currency, etc.</p>\n"}, {'answer_id': 60063, 'author': 'Andrew Johnson', 'author_id': 5109, 'author_profile': 'https://Stackoverflow.com/users/5109', 'pm_score': 1, 'selected': False, 'text': '<p>Some parsing may be required, and it\'s not 100% complete, but you can use <a href="http://en.wikipedia.org/wiki/List_of_holidays_by_country" rel="nofollow noreferrer">wikipedia</a>.</p>\n'}, {'answer_id': 60082, 'author': 'Tom Kidd', 'author_id': 2577, 'author_profile': 'https://Stackoverflow.com/users/2577', 'pm_score': 1, 'selected': False, 'text': '<p>For the method/assembly to figure out US Holidays, basically just figure out all the major holidays and the "formula" that they use. </p>\n\n<p>For the ones that never change, like Christmas, it\'s easy - December 25th. </p>\n\n<p>For the ones that do change somewhat, there\'s usually a formula - like the third Monday in February being Presidents Day. You can just have the method figure this out for a given year. </p>\n\n<p>This won\'t work for holidays without any particular pattern (i.e., some committee decides what the date is every year) but for all the major ones there\'s easily discernible formulas.</p>\n\n<p>This would actually be a great candidate for Test Driven Design. You will know all of the major holiday dates for a particular year, so you should be able to feed that year into the method and get the right answers.</p>\n'}, {'answer_id': 60083, 'author': 'Ian Nelson', 'author_id': 2084, 'author_profile': 'https://Stackoverflow.com/users/2084', 'pm_score': 4, 'selected': True, 'text': '<p>There\'s a web service at <a href="http://www.holidaywebservice.com" rel="noreferrer">http://www.holidaywebservice.com</a> which will provide dates of holidays for the USA, Republic of Ireland, England and Scotland. They also sell a DLL and source code.</p>\n\n<p>As for details of algorithms, you could do worse than check out the excellent <a href="https://rads.stackoverflow.com/amzn/click/com/0521702380" rel="noreferrer" rel="nofollow noreferrer">Calendrical Calculations</a> book (third edition), which is a really fascinating read for all matters calendrical, and includes sample LISP code for their calendar algorithms.</p>\n'}, {'answer_id': 60135, 'author': 'Brandon', 'author_id': 5959, 'author_profile': 'https://Stackoverflow.com/users/5959', 'pm_score': 3, 'selected': False, 'text': '<p>There are online calendars you can subscribe to.  For example, Google provides US Holidays:</p>\n\n<p><a href="http://www.google.com/calendar/ical/usa__en%40holiday.calendar.google.com/public/basic.ics" rel="nofollow noreferrer">ICAL</a>\n<a href="http://www.google.com/calendar/embed?src=usa__en%40holiday.calendar.google.com&amp;ctz=America/Los_Angeles" rel="nofollow noreferrer">HTML</a></p>\n'}, {'answer_id': 587770, 'author': 'CMPalmer', 'author_id': 14894, 'author_profile': 'https://Stackoverflow.com/users/14894', 'pm_score': 3, 'selected': False, 'text': '<p>There are tons of similar information that really should be provided by government web services. It would certainly save a lot of money and errors in the long run if the U.S. Government could provide information like this through web services. Heck, even having it in a downloadable, parseable format would be a big step in the right direction.</p>\n\n<p>I ran across this question while looking for a way to ensure an application skipped all U.S. Federal holidays in working days calculations. The best .gov source I found is:</p>\n\n<p><a href="https://www.opm.gov/policy-data-oversight/snow-dismissal-procedures/federal-holidays/" rel="nofollow noreferrer">Operating Status Schedules from OPM</a></p>\n\n<p>This has the data we need through 2020, but we\'ll have to type it into our own tables.</p>\n'}, {'answer_id': 4328081, 'author': 'christian', 'author_id': 474235, 'author_profile': 'https://Stackoverflow.com/users/474235', 'pm_score': 1, 'selected': False, 'text': '<p>I am looking for something similar PL/SQL based. I found jollyday (sourceforge). It is java maybe you can use it with ikvm from c#. Sadly I was not able to load the java api into my oracle rdbms ... so ... if you came across a pure C or PL/SQL solution, please let me know :-)</p>\n\n<p>Cheers \nChris</p>\n'}, {'answer_id': 12444678, 'author': 'Juraj Majer', 'author_id': 457072, 'author_profile': 'https://Stackoverflow.com/users/457072', 'pm_score': 4, 'selected': False, 'text': '<p>You can try <a href="http://kayaposoft.com/enrico/" rel="noreferrer">http://kayaposoft.com/enrico/</a>. Enrico Service is a free service providing public holidays for several countries including US. Public holidays for the countries like US or Germany are provided separately for each state. You can use either web service or json to get public holidays from Enrico.</p>\n'}]
['https://Stackoverflow.com/questions/59934', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1463/']