Java Utililty Methods Calendar Holiday

List of utility methods to do Calendar Holiday

Description

The list of methods to do Calendar Holiday are organized into topic(s).

Method

intgetHolidays(Calendar beginDate, Calendar endDate)
get Holidays
return getDaysBetween(beginDate, endDate) - getWorkingDay(beginDate, endDate);
booleanisHoliday(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;
booleanisHolidayInGermany(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;