Instance Method

nextDateAfterDate:matchingHour:minute:second:options:

Returns the next date after a given date that matches the given hour, minute, and second, component values.

Declaration

- (NSDate *)nextDateAfterDate:(NSDate *)date matchingHour:(NSInteger)hourValue minute:(NSInteger)minuteValue second:(NSInteger)secondValue options:(NSCalendarOptions)options;

Parameters

date

The date for which to perform the calculation.

hourValue

The value for the hour component.

minuteValue

The value for the minute component.

secondValue

The value for the second component.

options

Options for the calculation. For possible values, see NSCalendarOptions.

Return Value

A new NSDate object.

See Also

Scanning Dates

- startOfDayForDate:

Returns the first moment of a given date as a date instance.

- enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:

Computes the dates that match (or most closely match) a given set of components, and calls the block once for each of them, until the enumeration is stopped.

- nextDateAfterDate:matchingComponents:options:

Returns the next date after a given date matching the given components.

- nextDateAfterDate:matchingUnit:value:options:

Returns the next date after a given date matching the given calendar unit value.

NSCalendarOptions

The options for arithmetic operations involving calendars.

NSWrapCalendarComponents

A legacy constant used to control overflow in date calculations.