Instance Method

dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:

Returns a new date created with the given components base on a week-of-year value.

Declaration

- (NSDate *)dateWithEra:(NSInteger)eraValue yearForWeekOfYear:(NSInteger)yearValue weekOfYear:(NSInteger)weekValue weekday:(NSInteger)weekdayValue hour:(NSInteger)hourValue minute:(NSInteger)minuteValue second:(NSInteger)secondValue nanosecond:(NSInteger)nanosecondValue;

Parameters

eraValue

The value for the era component.

yearValue

The value for the year component.

weekValue

The value for the week-of-year component.

weekdayValue

The value to use as the weekday.

hourValue

The value for the hour component.

minuteValue

The value for the minute component.

secondValue

The value for the second component.

nanosecondValue

The value for the nanosecond component.

Return Value

A new NSDate instance created with the given components based on a week-of-year calculation, or nil if the components do not correspond to a valid date.

See Also

Calculating Dates

- dateFromComponents:

Returns a date representing the absolute time calculated from given components.

- dateByAddingComponents:toDate:options:

Returns a date representing the absolute time calculated by adding given components to a given date.

- dateByAddingUnit:value:toDate:options:

Returns a date representing the absolute time calculated by adding the value of a given component to a given date.

- dateBySettingHour:minute:second:ofDate:options:

Creates a new date calculated with the given time.

- dateBySettingUnit:value:ofDate:options:

Returns a new date representing the date calculated by setting a specific component of a given date to a given value, while trying to keep lower components the same.

- dateWithEra:year:month:day:hour:minute:second:nanosecond:

Returns a date created with the given components.

- nextWeekendStartDate:interval:options:afterDate:

Returns by reference the starting date and time interval range of the next weekend period after a given date.