Date
public extension Date
-
Compares this date and another given Date to check if both Dates are on the same day.
Declaration
Swift
func isSameDayAs(other date: Date) -> Bool
Parameters
date
Another Date to be compared to.
Return Value
Returns a Boolean indicating whether the 2 dates are on the same day.
-
Checks if this date is in between the given start and end dates.
Declaration
Swift
func isBetween(start: Date, end: Date) -> Bool
Parameters
start
The start date (inclusive).
end
The end date (inclusive).
Return Value
true
if this date is between the given start and end dates.