     }
 }
 
+extension NSDate : Comparable {}
+
+public func ==(ldate: NSDate, rdate: NSDate) -> Bool {
+    return ldate.timeIntervalSinceReferenceDate == rdate.timeIntervalSinceReferenceDate
+}
+
 
 public func <(ldate: NSDate, rdate: NSDate) -> Bool {
     return ldate.timeIntervalSinceReferenceDate < rdate.timeIntervalSinceReferenceDate
 }
 
+public func >(ldate: NSDate, rdate: NSDate) -> Bool {
+    return ldate.timeIntervalSinceReferenceDate > rdate.timeIntervalSinceReferenceDate
+}
+
 
 // MARK: - Operators
 
-extension NSDate {
-
-    internal func difference(toDate: NSDate, unitFlags: NSCalendarUnit, withCalendar calendar: NSCalendar = NSCalendar.currentCalendar()) -> NSDateComponents? {
+public extension NSDate {
+
+    public func difference(toDate: NSDate, unitFlags: NSCalendarUnit, withCalendar calendar: NSCalendar = NSCalendar.currentCalendar()) -> NSDateComponents? {
         return calendar.components(unitFlags, fromDate: self, toDate: toDate, options: NSCalendarOptions(rawValue: 0))
     }
 


// MARK: - Helpers to enable expressions e.g. date + 1.days - 20.seconds

extension Int {
    var nanoseconds: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.nanosecond = self
        return dateComponents
    }
    var seconds: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.second = self
        return dateComponents
    }

    var minutes: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.minute = self
        return dateComponents
    }

    var hours: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.hour = self
        return dateComponents
    }

    var days: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.day = self
        return dateComponents
    }

    var weeks: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.weekOfYear = self
        return dateComponents
    }

    var months: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.month = self
        return dateComponents
    }
    
    var years: NSDateComponents {
        let dateComponents = NSDateComponents()
        dateComponents.year = self
        return dateComponents


// MARK: - start of and end of operations

public extension NSDate {

    internal func biggerUnit(unit: NSCalendarUnit) -> NSCalendarUnit? {
        switch unit {
