This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let date1 = Date(timeIntervalSince1970: 0) // 1970-01-01 00:00:00 | |
let date2 = Date(timeIntervalSince1970: 60 * 60 * 24)// 1970-01-02 00:00:00 | |
func compareDates(date1: Date, date2: Date){ | |
switch date1 { | |
case date2: | |
print("date1 and date2 represent the same point in time") | |
case ...date2: |