我想知道如何减去两个具有日期选择器的文本字段。并将结果显示为标签。例如:(25.05.2013) – (17.05.2013) = 1周零1天
NSDate *now = [NSDate date];
NSDate *then = self.datepicker.date;
NSTimeInterval howLong = [now timeIntervalSinceDate:then];
NSUInteger w, d;
w = (howLong / 604800);
d =
NSString *str = [NSString stringWithFormat:@" x weeks, y days", w, d];
label1.text = str;