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.

Inheritance


Conforms To


Import Statement


import EventKit @import EventKit;

Availability


Available in OS X v10.8 and later.
  • The day of the week. (read-only)

    Declaration

    Swift

    var dayOfTheWeek: Int { get }

    Objective-C

    @property(nonatomic, readonly) NSInteger dayOfTheWeek

    Discussion

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

    Import Statement

    import EventKit

    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.

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.

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

    Declaration

    Swift

    init!(_ dayOfTheWeek: Int) -> EKRecurrenceDayOfWeek

    Objective-C

    + (EKRecurrenceDayOfWeek *)dayOfWeek:(NSInteger)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.

    Import Statement

    import EventKit

    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

    init!(_ dayOfTheWeek: Int, weekNumber weekNumber: Int) -> EKRecurrenceDayOfWeek

    Objective-C

    + (EKRecurrenceDayOfWeek *)dayOfWeek:(NSInteger)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.

    Import Statement

    import EventKit

    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: Int, weekNumber weekNumber: Int)

    Objective-C

    - (id)initWithDayOfTheWeek:(NSInteger)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.

    Import Statement

    import EventKit

    Availability

    Available in OS X v10.8 and later.