EKRecurrenceDayOfWeek Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/EventKit.framework
Availability
Available in OS X v10.8 and later.
Companion guide
Declared in
EKRecurrenceDayOfWeek.h

Overview

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.

Tasks

Accessing Properties of a Day of the Week

Creating a Day of the Week

Properties

dayOfTheWeek

The day of the week. (read-only)

@property(nonatomic, readonly) NSInteger dayOfTheWeek
Discussion

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

Availability
  • Available in OS X v10.8 and later.
Declared In
EKRecurrenceDayOfWeek.h

weekNumber

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

@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.
Declared In
EKRecurrenceDayOfWeek.h

Class Methods

dayOfWeek:

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

+ (id)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.

Availability
  • Available in OS X v10.8 and later.
Declared In
EKRecurrenceDayOfWeek.h

dayOfWeek:weekNumber:

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

+ (id)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.

Availability
  • Available in OS X v10.8 and later.
Declared In
EKRecurrenceDayOfWeek.h

Instance Methods

initWithDayOfTheWeek:weekNumber:

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

- (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.

Availability
  • Available in OS X v10.8 and later.
Declared In
EKRecurrenceDayOfWeek.h