mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 11:47:40 +00:00
24 lines
503 B
Swift
Executable File
24 lines
503 B
Swift
Executable File
import Foundation
|
|
|
|
extension NSDate: Comparable {}
|
|
|
|
public func == (lhs: NSDate, rhs: NSDate) -> Bool {
|
|
return lhs.isEqualToDate(rhs)
|
|
}
|
|
|
|
public func <= (lhs: NSDate, rhs: NSDate) -> Bool {
|
|
return lhs < rhs || lhs == rhs
|
|
}
|
|
|
|
public func >= (lhs: NSDate, rhs: NSDate) -> Bool {
|
|
return rhs <= lhs
|
|
}
|
|
|
|
public func < (lhs: NSDate, rhs: NSDate) -> Bool {
|
|
return lhs.compare(rhs) == NSComparisonResult.OrderedAscending
|
|
}
|
|
|
|
public func > (lhs: NSDate, rhs: NSDate) -> Bool {
|
|
return rhs < lhs
|
|
}
|