Instance Method

isDate:inSameDayAsDate:

Indicates whether two dates are in the same day.

Declaration

- (BOOL)isDate:(NSDate *)date1 inSameDayAsDate:(NSDate *)date2;

Parameters

date1

The first date to compare.

date2

The second date to compare.

Return Value

YES if both dates are within the same day, otherwise NO.

See Also

Comparing Dates

- compareDate:toDate:toUnitGranularity:

Indicates the ordering of two given dates based on their components down to a given unit granularity.

- isDate:equalToDate:toUnitGranularity:

Indicates whether two dates are equal to a given unit of granularity.

- isDateInToday:

Indicates whether the given date is in “today.”

- isDateInTomorrow:

Indicates whether the given date is in “tomorrow.”

- isDateInWeekend:

Indicates whether a given date falls within a weekend period, as defined by the calendar and the calendar's locale.

- isDateInYesterday:

Indicates whether the given date is in “yesterday.”