Created
March 16, 2018 14:53
-
-
Save wei-lee/5cc7440aedffcaa99d8bfffe6905e692 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
func testDateInterval() { | |
let dateFormatter = DateFormatter() | |
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss ZZZ" | |
let date1 = dateFormatter.date(from: "2018-03-16 14:00:00 +0000")! | |
let date2 = dateFormatter.date(from: "2018-03-15 14:00:00 +0000")! | |
let diff = date1.timeIntervalSinceNow | |
XCTAssertTrue(diff != 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment