Created
April 15, 2012 20:38
-
-
Save wemakeweb/2394725 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDate *now = [NSDate date]; | |
int day = [[[NSCalendar currentCalendar] components:NSWeekdayCalendarUnit | |
fromDate:now] weekday]; | |
if (day == 1) { //sunday | |
NSDate *dayToFetch = [now addTimeInterval:60*60*24]; | |
} else { | |
NSDate *dayToFetch = now; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment