if (datStartDate > datEndDate) {
This doesn't seem to work. I know there's a isEqual
, etc., but how do I perform "is greater than"?
There are both NSDate
.
The easiest method i'm aware is:
if( [firstDate timeIntervalSinceDate:secondDate] > 0 ) {
The other answers cover compare:, wanted to add some flavour ;).