             theseComponents.weekday = NSDateComponentUndefined
             theseComponents.weekdayOrdinal = NSDateComponentUndefined
             theseComponents.quarter = NSDateComponentUndefined
-       }
+        }
 
         if YWDUnits.contains(unit) {
             theseComponents.year = NSDateComponentUndefined
             theseComponents.month = NSDateComponentUndefined
             theseComponents.day = NSDateComponentUndefined
             theseComponents.quarter = NSDateComponentUndefined
-      }
+        }
 
         for thisUnit in smallerUnits(unit)! {
             let nextBiggerUnit = biggerUnit(thisUnit)!

    }
}


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? {
        return calendar.components(unitFlags, fromDate: self, toDate: toDate, options: NSCalendarOptions(rawValue: 0))
    }



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

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

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

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

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

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

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