 
 // MARK: NSDate and TimeFrame operators overload
 
-func - (left: NSDate, right: TimeFrameUnit) -> NSDate? {
-    let negRight = TimeFrameUnit(value: -right.value, unitMeasure: right.unitMeasure)
+func - (left: NSDate, right: TimeFrame) -> NSDate? {
+    let negRight = TimeFrame(value: -right.value, unitMeasure: right.unitMeasure)
     return NSCalendar.currentCalendar().dateByAddingComponents(negRight.dateComponents(), toDate: left, options: nil)
 }
 
-func + (left: NSDate, right: TimeFrameUnit) -> NSDate? {
+func + (left: NSDate, right: TimeFrame) -> NSDate? {
     return NSCalendar.currentCalendar().dateByAddingComponents(right.dateComponents(), toDate: left, options: nil)
 }
 
-func -= (left: NSDate, right: TimeFrameUnit) -> NSDate? {
-    let negRight = TimeFrameUnit(value: -right.value, unitMeasure: right.unitMeasure)
+func -= (left: NSDate, right: TimeFrame) -> NSDate? {
+    let negRight = TimeFrame(value: -right.value, unitMeasure: right.unitMeasure)
     return NSCalendar.currentCalendar().dateByAddingComponents(negRight.dateComponents(), toDate: left, options: nil)
 }
 
-func += (left: NSDate, right: TimeFrameUnit) -> NSDate? {
+func += (left: NSDate, right: TimeFrame) -> NSDate? {
     return NSCalendar.currentCalendar().dateByAddingComponents(right.dateComponents(), toDate: left, options: nil)
 }
 



extension Int {
    var seconds: TimeFrameUnit {
        return TimeFrameUnit(value: self, unitMeasure:.Seconds);
    }
    var minutes: TimeFrameUnit {
        return TimeFrameUnit(value: self, unitMeasure:.Minutes);
    }
    var hours: TimeFrameUnit {
        return TimeFrameUnit(value: self, unitMeasure:.Hours);
    }
    var days: TimeFrameUnit {
        return TimeFrameUnit(value: self, unitMeasure:.Days);
    }
    var weeks: TimeFrameUnit {
        return TimeFrameUnit(value: self, unitMeasure:.Weeks);
    }
    var months: TimeFrameUnit {
        return TimeFrameUnit(value: self, unitMeasure:.Months);
    }
    var years: TimeFrameUnit {
        return TimeFrameUnit(value: self, unitMeasure:.Years);
    }
    
}

}


public struct TimeFrame {
    var value: Int
    var unitMeasure: TimeUnitMeasure
    
