java.lang.Object
ch.tocco.nice2.optional.calendar.impl.ical.util.Utils

public class Utils extends Object
  • Method Details

    • toPeriod

      public static net.fortuna.ical4j.model.Period toPeriod(DateTimeValue start, DateTimeValue end)
      Creates an ical-period object that uses the specified DateTimeValues. The values are converted into UTC milliseconds.
    • toICalDate

      public static net.fortuna.ical4j.model.Date toICalDate(DateTimeValue value)
      Returns either icals datetime or date.
    • createICalEvent

      public static net.fortuna.ical4j.model.component.VEvent createICalEvent(CalendarEvent event)
      Creates an ical VEvent object from the specified CalendarEvent.
    • getICal

      public static net.fortuna.ical4j.model.Calendar getICal(String calendarName, @Nullable @Nullable String calendarDescription, Iterable<CalendarEvent> events)
      Creates an ical Calendar object with the specified collection of CalendarEvents.
      Parameters:
      calendarName - the calendar name
      calendarDescription - an optional calendar description
      events - the events thar are included in the calendar
    • createEventsFromICal

      public static List<CalendarEvent> createEventsFromICal(net.fortuna.ical4j.model.Period p, net.fortuna.ical4j.model.Calendar ical, Map<UUID,CalendarEvent> eventMap)
      Iterates through all VEVENTs of the ical and adds them to a result list. The calendar events in the list are looked up from the specified eventMap. Recurring-events are resolved and added as normal CalendarEvents to the list.
    • buildRecurrenceInfo

      public static RecurrenceInfo buildRecurrenceInfo(String recurrence, @Nullable @Nullable String exceptionDates)