getRecurrenceDateTimeCollection static method

List<DateTime> getRecurrenceDateTimeCollection(
  1. String rRule,
  2. DateTime recurrenceStartDate,
  3. {DateTime? specificStartDate,
  4. DateTime? specificEndDate}

Returns the date time collection at which the recurrence appointment will recur

Using this method the recurrence appointments occurrence date time collection can be obtained.

  • rRule - required - the recurrence rule of the appointment
  • recurrenceStartDate - required - the start date in which the recurrence starts.
  • specificStartDate - optional - the specific start date, used to get the date collection for a specific interval of dates.
  • specificEndDate - optional - the specific end date, used to get the date collection for a specific interval of dates.

return List<DateTime>

See also:

DateTime dateTime = DateTime(2020, 03, 15);
List<DateTime> dateCollection =
                            'FREQ=DAILY;INTERVAL=1;COUNT=3', dateTime);


static List<DateTime> getRecurrenceDateTimeCollection(
    String rRule, DateTime recurrenceStartDate,
    {DateTime? specificStartDate, DateTime? specificEndDate}) {
  assert(specificStartDate == null ||
      specificEndDate == null ||
          specificEndDate, specificStartDate));
  assert(specificStartDate == null ||
      specificEndDate == null ||
          specificStartDate, specificEndDate));
  return RecurrenceHelper.getRecurrenceDateTimeCollection(
      rRule, recurrenceStartDate,
      specificStartDate: specificStartDate, specificEndDate: specificEndDate);