Instance Method
isDate(_:inSameDayAs:)
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
Returns a Boolean value indicating whether a date is within the same day as another date, as defined by the calendar and calendar’s locale.
Parameters
date1A date to check for containment.
date2A date to check for containment.
Return Value
true if date1 and date2 are in the same day.