Am I doing something wrong or is it a bug? I am getting 21000 year when parsing 01/01/00 string to date using the "MM/dd/yy" format:
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"MM/dd/yy"];
NSDate *originalDate = [NSDate dateWithTimeIntervalSinceReferenceDate:-24 * 60 * 60 * 366];
NSString *jan01String = [dateFormatter stringFromDate:originalDate];
NSDate *jan01Date = [dateFormatter dateFromString:jan01String];
NSLog(@"originalDate: %@, jan01String: %@, jan01Date: %@", originalDate, jan01String, jan01Date);
output:
2016-07-14 15:44:49.723 NSDateFormatterTests[5414:1537640] originalDate: 2000-01-01 00:00:00 +0000, jan01String: 01/01/00, jan01Date: 12099-12-31 22:00:00 +0000