java.lang.Object
de.focus_shift.jollyday.core.util.CalendarUtil

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

    • contains

      public static boolean contains(@NonNull Set<Holiday> holidays, @NonNull 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(@NonNull Set<Holiday> holidays, @NonNull LocalDate date, @Nullable 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