RecurrenceRule

public struct RecurrenceRule
  • The calendar of recurrence rule.

    Declaration

    Swift

    public var calendar: Calendar
  • The frequency of the recurrence rule.

    Declaration

    Swift

    public var frequency: RecurrenceFrequency
  • Specifies how often the recurrence rule repeats over the component of time indicated by its frequency. For example, a recurrence rule with a frequency type of RecurrenceFrequency.weekly and an interval of 2 repeats every two weeks.

    The default value of this property is 1.

    Declaration

    Swift

    public var interval: Int
  • Indicates which day of the week the recurrence rule treats as the first day of the week.

    The default value of this property is EKWeekday.monday.

    Declaration

    Swift

    public var firstDayOfWeek: EKWeekday
  • The start date of recurrence rule.

    The default value of this property is current date.

    Declaration

    Swift

    public var startDate: Date
  • Indicates when the recurrence rule ends. This can be represented by an end date or a number of occurrences.

    Declaration

    Swift

    public var recurrenceEnd: EKRecurrenceEnd?
  • An array of ordinal integers that filters which recurrences to include in the recurrence rule’s frequency. Values can be from 1 to 366 and from -1 to -366.

    For example, if a bysetpos of -1 is combined with a RecurrenceFrequency.monthly frequency, and a byweekday of (EKWeekday.monday, EKWeekday.tuesday, EKWeekday.wednesday, EKWeekday.thursday, EKWeekday.friday), will result in the last work day of every month.

    Negative values indicate counting backwards from the end of the recurrence rule’s frequency.

    Declaration

    Swift

    public var bysetpos: [Int]
  • The days of the year associated with the recurrence rule, as an array of integers. Values can be from 1 to 366 and from -1 to -366.

    Negative values indicate counting backwards from the end of the year.

    Declaration

    Swift

    public var byyearday: [Int]
  • The months of the year associated with the recurrence rule, as an array of integers. Values can be from 1 to 12.

    Declaration

    Swift

    public var bymonth: [Int]
  • The weeks of the year associated with the recurrence rule, as an array of integers. Values can be from 1 to 53 and from -1 to -53. According to ISO8601, the first week of the year is that containing at least four days of the new year.

    Negative values indicate counting backwards from the end of the year.

    Declaration

    Swift

    public var byweekno: [Int]
  • The days of the month associated with the recurrence rule, as an array of integers. Values can be from 1 to 31 and from -1 to -31.

    Negative values indicate counting backwards from the end of the month.

    Declaration

    Swift

    public var bymonthday: [Int]
  • The days of the week associated with the recurrence rule, as an array of EKWeekday objects.

    Declaration

    Swift

    public var byweekday: [EKWeekday]
  • The hours of the day associated with the recurrence rule, as an array of integers.

    Declaration

    Swift

    public var byhour: [Int]
  • The minutes of the hour associated with the recurrence rule, as an array of integers.

    Declaration

    Swift

    public var byminute: [Int]
  • The seconds of the minute associated with the recurrence rule, as an array of integers.

    Declaration

    Swift

    public var bysecond: [Int]
  • The inclusive dates of the recurrence rule.

    Declaration

    Swift

    public var rdate: InclusionDate?
  • The exclusion dates of the recurrence rule. The dates of this property will not be generated, even if some inclusive rdate matches the recurrence rule.

    Declaration

    Swift

    public var exdate: ExclusionDate?
  • Declaration

    Swift

    public init(frequency: RecurrenceFrequency)
  • Declaration

    Swift

    public init?(rruleString: String)
  • Declaration

    Swift

    public func toRRuleString() -> String
  • Declaration

    Swift

    func allOccurrences(endless endlessRecurrenceCount: Int = Iterator.endlessRecurrenceCount) -> [Date]
  • Declaration

    Swift

    func occurrences(between date: Date, and otherDate: Date, endless endlessRecurrenceCount: Int = Iterator.endlessRecurrenceCount) -> [Date]