List of utility methods to do Calendar Holiday
int | getHolidays(Calendar beginDate, Calendar endDate) get Holidays return getDaysBetween(beginDate, endDate) - getWorkingDay(beginDate, endDate);
|
boolean | isHoliday(Calendar cal) Check if given Calendar object represents a holiday. int year = cal.get(Calendar.YEAR); Set<?> yearSet = getHolidaySet(year); for (Object aYearSet : yearSet) { Date date = (Date) aYearSet; if (checkDate(cal, dateToCalendar(date))) { return true; return false; |
boolean | isHolidayInGermany(Calendar day) is Holiday In Germany int month = day.get(Calendar.MONTH); int dayOfMonth = day.get(Calendar.DAY_OF_MONTH); if (month == Calendar.JANUARY && dayOfMonth == 1) return true; return false; |