iPhone NSDate eg. next Friday
问题 I want to create a function which results the date of next Friday but I have no plan how to do it. Has anyone a good hint to me ? 回答1: E.g. Get current date using NSDate, then use 'components>fromDate:' from NSCalendar to get the NSDateComponents, then add the time difference to next Friday and create a new NSDate and Bob's is your uncle. 回答2: Here is my working solution for getting the next 5 Sundays in Gregorian calendar: self.nextBeginDates = [NSMutableArray array]; NSDateComponents