Skip to main content

Recurrence - Monthly (examples)

Interval

Range

RecurrenceInfo.DayNumber - Monthly

RecurrenceInfo.WeekOfMonth_Monthly_None

RecurrenceInfo.WeekOfMonth_Monthly_Last

RecurrenceRange.NoEndDate

RecurrenceRange.OccurrenceCount

RecurrenceRange.EndByDate

  1. An appointment occurs on the 23th day of each month. Ten occurrences are specified.

    RRULE:FREQ=MONTHLY;COUNT=10;BYMONTHDAY=23
    
    apt.RecurrenceInfo.Type = RecurrenceType.Monthly;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.DayNumber = 23;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.None;
    apt.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount;
    apt.RecurrenceInfo.OccurrenceCount = 10;
    
  2. An appointment occurs on the last Wednesday of the month, every 2 months. The occurrence chain has no end date.

    RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=WE;BYSETPOS=-1
    
    apt.RecurrenceInfo.Type = RecurrenceType.Monthly;
    apt.RecurrenceInfo.Periodicity = 2;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.Last;
    apt.RecurrenceInfo.WeekDays = WeekDays.Wednesday;
    apt.RecurrenceInfo.Range = RecurrenceRange.NoEndDate;
    
  3. An appointment occurs on the first Monday of the month every 3 months. The duration is one year.

    RRULE:FREQ=MONTHLY;UNTIL=20171103T080000Z;INTERVAL=3;BYDAY=MO;BYSETPOS=1
    
    apt.RecurrenceInfo.Type = RecurrenceType.Monthly;
    apt.RecurrenceInfo.Periodicity = 3;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.First;
    apt.RecurrenceInfo.WeekDays = WeekDays.Monday;
    apt.RecurrenceInfo.Range = RecurrenceRange.EndByDate;
    apt.RecurrenceInfo.End = apt.RecurrenceInfo.Start.AddYears(1);
    
See Also