Class RecurrentEventHelper

java.lang.Object
org.ametys.plugins.workspaces.calendars.helper.RecurrentEventHelper

public final class RecurrentEventHelper extends Object
Helper for recurrent event operation
  • Method Details

    • getNextDate

      public static ZonedDateTime getNextDate(EventRecurrenceTypeEnum recurrenceType, ZonedDateTime eventStartDate, ZonedDateTime date)
      Get the next occurrence date
      Parameters:
      recurrenceType - recurrence type
      eventStartDate - the event start date
      date - the occurrence date
      Returns:
      the next occurrence date
    • getWorkingDays

      public static List<Integer> getWorkingDays()
      get the list of working days
      Returns:
      a list of integer, matching Calendar days
    • getOccurrences

      public static List<ZonedDateTime> getOccurrences(ZonedDateTime startDate, ZonedDateTime endDate, ZonedDateTime eventStartDate, ZonedDateTime originalOccurrenceStartDate, EventRecurrenceTypeEnum recurrenceType, List<ZonedDateTime> excludedOccurences, ZoneId zoneId, ZonedDateTime untilDate)
      Compute the occurrence of an event
      Parameters:
      startDate - the start of the range to compute occurrences
      endDate - the end of the range to compute occurrences
      eventStartDate - the start date of the occurrence
      originalOccurrenceStartDate - the original start date of the occurrence (different as the eventStartDate when editing an occurrence)
      recurrenceType - the recurrence type
      excludedOccurences - the occurrences to exclude
      zoneId - the zoneId used for the dates
      untilDate - until date of the recurring event
      Returns:
      a list of occurrence start dates