From 58a673d559bd00d7c4f1d4e94f033a7bbf8c4b39 Mon Sep 17 00:00:00 2001 From: danjiang Date: Sat, 8 Aug 2015 16:13:10 +0800 Subject: [PATCH] Fixed dateAtEndOfWeek --- AFDateHelper/AFDateExtension.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AFDateHelper/AFDateExtension.swift b/AFDateHelper/AFDateExtension.swift index f1200d1..0cee8ed 100644 --- a/AFDateHelper/AFDateExtension.swift +++ b/AFDateHelper/AFDateExtension.swift @@ -422,7 +422,7 @@ public extension NSDate { { let flags :NSCalendarUnit = NSCalendarUnit.CalendarUnitYear | NSCalendarUnit.CalendarUnitMonth | NSCalendarUnit.CalendarUnitWeekOfYear | NSCalendarUnit.CalendarUnitWeekday var components = NSCalendar.currentCalendar().components(flags, fromDate: self) - components.weekday = NSCalendar.currentCalendar().firstWeekday + 7 + components.weekday = NSCalendar.currentCalendar().firstWeekday + 6 components.hour = 0 components.minute = 0 components.second = 0