Class RecurrenceRule.WeekdayNum

java.lang.Object
org.dmfs.rfc5545.recur.RecurrenceRule.WeekdayNum
Enclosing class:
RecurrenceRule

public static class RecurrenceRule.WeekdayNum extends Object
This class represents the position of a Weekday in a specific range. It parses values like -4SU which means the fourth last Sunday in the interval or 2MO which means the second Monday in the interval. In addition this class accepts simple weekdays like SU which means every Sunday in the interval.

These values are defined as:

        weekdaynum  = [[plus / minus] ordwk] weekday

        plus        = "+"

        minus       = "-"

        ordwk       = 1*2DIGIT       ;1 to 53

        weekday     = "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA"
        ;Corresponding to SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
        ;FRIDAY, and SATURDAY days of the week.
 
  • Field Details

    • pos

      public final int pos
      The position of this weekday in the interval. This value is 0 if this instance means every occurrence of weekday in the interval.
    • weekday

      public final org.dmfs.rfc5545.Weekday weekday
      The Weekday.
  • Constructor Details

    • WeekdayNum

      public WeekdayNum(int pos, org.dmfs.rfc5545.Weekday weekday)
      Create a new WeekdayNum instance.

      TODO: update range check

      Parameters:
      pos - The position of the weekday in the Interval or 0 for every occurrence of the weekday.
      weekday - The Weekday.
  • Method Details