Created
July 5, 2014 14:49
-
-
Save jklausa/3fff60b7f51579fff673 to your computer and use it in GitHub Desktop.
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 | |
@infix func ==(lhs: NSDate, rhs: NSDate) -> Bool { | |
return lhs == rhs | |
} | |
@infix func <=(lhs: NSDate, rhs: NSDate) -> Bool { | |
return !(lhs > rhs) | |
} | |
@infix func >=(lhs: NSDate, rhs: NSDate) -> Bool { | |
return lhs == rhs || lhs > rhs | |
} | |
@infix func >(lhs: NSDate, rhs: NSDate) -> Bool { | |
return lhs.compare(rhs) == NSComparisonResult.OrderedAscending | |
} | |
extension NSDate: Equatable { | |
} | |
extension NSDate: Comparable { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment