1 2 3 4 5 6 7 |
if ([dateA compare:dateB] == NSOrderedDescending) { NSLog(@"dateA is later than dateB"); } else if ([dateA compare:dateB] == NSOrderedAscending) { NSLog(@"dateA is earlier than dateB"); } else { NSLog(@"dates are equal"); } |