NSDate * now = [NSDate date];
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd"];
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];//本地化
[df setLocale:locale];
NSString *myDateString = @"2013-04-09";
NSDate *myDate = [df dateFromString:myDateString];
NSTimeInterval timeBetween = [now timeIntervalSinceDate:myDate];
NSLog(@"%f",timeBetween);
NSString NSDate 计算时间差,布布扣,bubuko.com
原文:http://blog.csdn.net/leochang130731/article/details/23290821