         return !self.isWeekend()
     }
     func isWeekend() -> Bool {
-        let range = NSCalendar.currentCalendar().maximumRangeOfUnit(.WeekdayCalendarUnit)
+        let range = NSCalendar.currentCalendar().maximumRangeOfUnit(.CalendarUnitWeekday)
         return (self.weekday() == range.location || self.weekday() == range.length)
     }
     

                }
                let formatter = NSDateFormatter()
                formatter.dateFormat = "EEE, d MMM yyyy HH:mm:ss ZZZ"
                if let date = formatter.dateFromString(string) {
                    self.init(timeInterval:0, sinceDate:date)
                } else {
                    self.init()

                
                let formatter = NSDateFormatter()
                formatter.dateFormat = dateFormat
                if let date = formatter.dateFromString(string as String) {
                    self.init(timeInterval:0, sinceDate:date)
                } else {
                    self.init()
