Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

Commit

Permalink
removed unnecessary methods
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeleisel committed Feb 1, 2015
1 parent 48f084a commit c980454
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions ExSwift/NSDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,27 +229,16 @@ public extension NSDate{
}
}

// MARK: Comparable functions
extension NSDate: Equatable {
}

public func ==(lhs: NSDate, rhs: NSDate) -> Bool {
return lhs.compare(rhs) == NSComparisonResult.OrderedSame
}

public func <(lhs: NSDate, rhs: NSDate) -> Bool {
return lhs.compare(rhs) == NSComparisonResult.OrderedAscending
}

public func >(lhs: NSDate, rhs: NSDate) -> Bool {
return !(lhs <= rhs)
}

public func <=(lhs: NSDate, rhs: NSDate) -> Bool {
return lhs < rhs || lhs == rhs
}

public func >=(lhs: NSDate, rhs: NSDate) -> Bool {
return lhs > rhs || lhs == rhs
extension NSDate: Comparable {
}

extension NSDate: Comparable {
public func <(lhs: NSDate, rhs: NSDate) -> Bool {
return lhs.compare(rhs) == NSComparisonResult.OrderedAscending
}

0 comments on commit c980454

Please sign in to comment.