File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1136,6 +1136,7 @@ - (BOOL)nextWeekendStartDate:(out NSDate * _Nullable *)datep interval:(out NSTim
11361136 NSInteger day = [self component: NSCalendarUnitWeekday fromDate: date];
11371137 NSInteger daysUntil;
11381138 BOOL back = (options & NSCalendarSearchBackwards ) == NSCalendarSearchBackwards ;
1139+ NSDate *next;
11391140
11401141 if (back) {
11411142 // previous Monday
@@ -1145,7 +1146,7 @@ - (BOOL)nextWeekendStartDate:(out NSDate * _Nullable *)datep interval:(out NSTim
11451146 daysUntil = 7 - (day % 7 );
11461147 }
11471148
1148- NSDate * next = [self dateByAddingUnit: NSDayCalendarUnit value: daysUntil toDate: date options: 0 ];
1149+ next = [self dateByAddingUnit: NSDayCalendarUnit value: daysUntil toDate: date options: 0 ];
11491150 next = [self startOfDayForDate: next];
11501151
11511152 if (back) {
You can’t perform that action at this time.
0 commit comments