Sven has posted 1 posts at DZone. View Full User Profile

Determine Holiday Dates for a Country/State/Region

02.18.2010
| 1752 views |
  • submit to reddit

I have come across the need to determine which days are holidays for several times now. To solve this problem generally I have created the open source project Jollyday. It is an API which calculates holidays (currently non-working holidays only) for a given country, state and region for a given year. Currently it is calculating the holidays for about 60 countries world-wide out-of-the-box.

 Please see Jollyday at SourceForge (http://jollyday.sourceforge.net).

The calculation is based on XML files which contain the holiday rules for each country and should provide a possibility for anyone interested to participate in the project. Anyone is welcome to review the rules for her/his country/state/region to improve the data basis.

The API uses no database or network connection at runtime. Its only API dependency is the JODA-time API.

Everyone is welcome to give it a try and/or improve the data.

Cheers, Sven

0
Published at DZone with permission of its author, Sven Diedrichsen.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)