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

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

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