NSDate is not converting correctly using NSDateFormatter
问题 I have the following NSDateFormatter: NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"MMM. d, yyyy"]; NSLocale *usLocal = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]; [dateFormatter setLocale:usLocal]; and I have a while loop which starts at a given start date and increments the date by one until it reaches a specific end date. NSDate *d = start; while(YES){ NSString *td = [dateFormatter stringFromDate:d]; NSLog(@"converted date %@ to %