                 }
                 
                 if showWeekday {
-                    var comps = NSCalendar.currentCalendar().components(NSCalendarUnit.WeekdayCalendarUnit, fromDate: self)
+                    var comps = NSCalendar.currentCalendar().components(NSCalendarUnit.CalendarUnitWeekday, fromDate: self)
                     formattedString = "\(NSDate.weekdayForIndex(comps.weekday))"
                 }
             }

    class public func dateForNextHour(date: NSDate) -> NSDate! {
        
        var cal = NSCalendar.currentCalendar()
        var comps = cal.components(NSCalendarUnit.CalendarCalendarUnit |
            NSCalendarUnit.TimeZoneCalendarUnit |
            NSCalendarUnit.YearCalendarUnit |
            NSCalendarUnit.MonthCalendarUnit |
            NSCalendarUnit.WeekdayCalendarUnit |
            NSCalendarUnit.DayCalendarUnit |
            NSCalendarUnit.HourCalendarUnit |
            NSCalendarUnit.MinuteCalendarUnit |
            NSCalendarUnit.SecondCalendarUnit, fromDate: date.dateByAddingTimeInterval(60*60))
        
        comps.second = 0
        comps.minute = 0

        }
        
        var cal = NSCalendar.currentCalendar()
        var currentComps = cal.components(NSCalendarUnit.CalendarUnitDay, fromDate: self)
        var compareComps = cal.components(NSCalendarUnit.CalendarUnitDay, fromDate: compareDate)
        
        return (currentComps.day == compareComps.day)
    }
