Class CalendarUtil


  • public final class CalendarUtil
    extends Object
    Utility class for date operations.
    • Method Detail

      • contains

        public static boolean contains​(Set<Holiday> holidays,
                                       LocalDate date)
        Shows if the requested date is contained in the Set of holidays. Calls #contains(holidays, date, null)
        Parameters:
        holidays - the holidays to search through
        date - the date to look for
        Returns:
        the date is contained in the set of holidays
      • contains

        public static boolean contains​(Set<Holiday> holidays,
                                       LocalDate date,
                                       HolidayType holidayType)
        Shows if the requested date is contained in the Set of holidays.
        Parameters:
        holidays - a Set object.
        date - a LocalDate object.
        holidayType - a HolidayType object
        Returns:
        contains this date