我在 NSArray 中有 NSdate 对象。我想从日期数组中获取最新信息。
NSDate *tomorrow = [NSDate dateWithTimeInterval:(24*60*60) sinceDate:[NSDate date]];
NSDate *today = [NSDate date];
NSDate *yesterday = [NSDate dateWithTimeInterval:-(24*60*60) sinceDate:[NSDate date]];
NSMutableArray* arr = [[NSMutableArray alloc] initWithObjects:today,yesterday,tomorrow,today,yesterday,tomorrow, nil];
我的返回值应该是明天(最晚日期)。