Created
May 22, 2018 04:07
-
-
Save billibala/1bc1ae402966b74b875ca2cff3b74b04 to your computer and use it in GitHub Desktop.
Demonstrates run time error when the bounds of a date range is not in ascending order
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
//: Playground - noun: a place where people can play | |
import Cocoa | |
let now = Date() | |
let earlierDate = Date(timeIntervalSinceNow: -2 * 24 * 3600) | |
switch Date() { | |
case now..<earlierDate: | |
print("hello") | |
default: | |
print("nay") | |
} |
Author
billibala
commented
May 22, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment