         let tz: NSTimeZone = inTimezone ?? NSTimeZone.localTimeZone()
         var cal = NSCalendar.currentCalendar()
         cal.timeZone = tz
-        var comps = cal.components(NSCalendarUnit.HourCalendarUnit, fromDate: self)
+        var comps = cal.components(NSCalendarUnit.CalendarUnitHour, fromDate: self)
         return comps.hour
     }
     

        
    
    private func dateString() -> String {
        var comps = NSCalendar.currentCalendar().components(NSCalendarUnit.MonthCalendarUnit | NSCalendarUnit.DayCalendarUnit, fromDate: self)
        return "\(NSDate.monthStringForIndex(comps.month)) \(comps.day)"
        
    }
    
    
    public func timeString() -> String {
        var comps = NSCalendar.currentCalendar().components(NSCalendarUnit.HourCalendarUnit | NSCalendarUnit.MinuteCalendarUnit, fromDate: self)
        var hours = comps.hour
        var amPm = "am"
        

    class public func endOfDay(date: NSDate) -> NSDate! {
        var endDate = date.dateByAddingTimeInterval(60*60*24)
        var cal = NSCalendar.currentCalendar()
        var comps = cal.components(NSCalendarUnit.CalendarUnitYear | NSCalendarUnit.CalendarUnitWeekOfMonth | NSCalendarUnit.CalendarUnitDay, fromDate: date)
        return cal.dateFromComponents(comps)!
    }
    
