http://jollyday.sourceforge.net/. Beispiel von der Webseite:
-
To get a HolidayManager instance for US holidays:
HolidayManager m = HolidayManager.getInstance(HolidayCalendar.UNITED_STATES);
- To get the holidays for the state New York:
Set<Holiday> holidays = m.getHolidays(2010, "ny");
- To get the holidays for New York City in the state New York:
Set<Holiday> holidays = m.getHolidays(2010, "ny", "nyc");
- To get a HolidayManager instance for your own holidays:
- create a Holidays file i.e. Holidays_MyOwn.xml
- put your holiday rules into this (for examples please the XML files in the provided JAR file in the folder holidays)
- put your Holidays_MyOwn.xml in your applications classpath
- to use your holiday rules create an HolidayManager instance by calling HolidayManager m = HolidayManager.getInstance("MyOwn");
- call Set<Holiday> holidays = m.getHolidays(2010); to retrieve the holidays for 2010.
Welche deutschen Feiertage erfasst werden listet http://jollyday.sourceforge.net/data/de.html auf. Die Lib. steht unter der Apache Lizenz und stammt vom Deutschen Sven Diedrichsen.