isEqual(to:)
Returns a Boolean value that indicates whether a given object is a date that is exactly equal the receiver.
Declaration
func isEqual(to otherDate: Date) -> BoolParameters
- otherDate:
The date to compare with the receiver.
Return Value
true if the otherDate is an NSDate object and is exactly equal to the receiver, otherwise false.
Discussion
This method detects sub-second differences between dates. If you want to compare dates with a less fine granularity, use timeIntervalSince(_:) to compare the two dates.