         return calendar.dateByAddingComponents(dateComp, toDate: date, options: nil)
     }
     
-    public class func dateByRemovingCalendarComponent(calendarComponent: CalendarComponent)(date:NSDate, value: UInt) -> NSDate?  {
+    public class func dateByRemovingCalendarComponent(calendarComponent: TimeUnit)(date:NSDate, value: UInt) -> NSDate?  {
         let val = -Int(value)
         let dateComp = NSDateComponents()
         switch calendarComponent {


import Foundation

public enum CalendarComponent {
    case Second
    case Minutes
    case Hour

            return NSCalendar.currentCalendar()
    }
    
    public class func dateByAddingCalendarComponent(calendarComponent: TimeUnit)(date:NSDate, value: UInt) -> NSDate?  {
        let val = Int(value)
        let dateComp = NSDateComponents()
        switch calendarComponent {
