Mac Developer Library

Developer

EventKit Framework Reference EKRecurrenceDayOfWeek Class Reference

Options
Deployment Target:

On This Page
Language:

EKRecurrenceDayOfWeek

The EKRecurrenceDayOfWeek class represents a day of the week for use with an EKRecurrenceRule object. A day of the week can optionally have a week number, indicating a specific day in the recurrence rule’s frequency. For example, a day of the week with a day value of Tuesday and a week number of 2 would represent the second Tuesday of every month in a monthly recurrence rule, and the second Tuesday of every year in a yearly recurrence rule. A day of the week with a week number of 0 ignores its week number.

  • The day of the week. (read-only)

    Declaration

    Swift

    var dayOfTheWeek: EKWeekday { get }

    Objective-C

    @property(nonatomic, readonly) EKWeekday dayOfTheWeek

    Discussion

    Values are from 1 to 7, with Sunday being 1.

    Availability

    Available in OS X v10.8 and later.

  • The week number of the day of the week. (read-only)

    Declaration

    Swift

    var weekNumber: Int { get }

    Objective-C

    @property(nonatomic, readonly) NSInteger weekNumber

    Discussion

    Values range from –53 to 53. A negative value indicates a value from the end of the range. 0 indicates the week number is irrelevant.

    Availability

    Available in OS X v10.8 and later.

  • Creates and returns a day of the week with a given day.

    Declaration

    Swift

    convenience init(_ dayOfTheWeek: EKWeekday)

    Objective-C

    + (instancetype)dayOfWeek:(EKWeekday)dayOfTheWeek

    Parameters

    dayOfTheWeek

    The day of the week. Values range from 1 to 7, with Sunday being 1.

    Return Value

    The new day of the week.

    Discussion

    The week number of the returned day of the week is 0.

    Availability

    Available in OS X v10.8 and later.

  • Creates and returns an autoreleased day of the week with a given day and week number.

    Declaration

    Swift

    convenience init(_ dayOfTheWeek: EKWeekday, weekNumber weekNumber: Int)

    Objective-C

    + (instancetype)dayOfWeek:(EKWeekday)dayOfTheWeek weekNumber:(NSInteger)weekNumber

    Parameters

    dayOfTheWeek

    The day of the week. Values range from 1 to 7, with Sunday being 1.

    weekNumber

    The week number.

    Return Value

    The new day of the week.

    Availability

    Available in OS X v10.8 and later.

  • Initializes and returns a day of the week with a given day and week number.

    Declaration

    Swift

    init(dayOfTheWeek dayOfTheWeek: EKWeekday, weekNumber weekNumber: Int)

    Objective-C

    - (id)initWithDayOfTheWeek:(EKWeekday)dayOfTheWeek weekNumber:(NSInteger)weekNumber

    Parameters

    dayOfTheWeek

    The day of the week. Values range from 1 to 7, with Sunday being 1.

    weekNumber

    The week number.

    Return Value

    The initialized day of the week.

    Availability

    Available in OS X v10.8 and later.