No problem,
Code:
NSDateFormatter * newFormatter = [[NSDateFormatter alloc] init];
[newFormatter setDateFormat:@"dd mm yyyy"];
NSDate * endDate = [newFormatter dateFromString:@"04 01 2010"]; //This is the end date, this is what we're checking for
[newFormatter release];
NSDate * nowDate = [NSDate date];
if ([nowDate compare:endDate] == NSOrderedDescending){
NSLog(@"expired");
//Show message, then quit
}
else
{
NSLog(@"nope, still good");
//It hasn't expired yet.
}
I created endDate in the way shown above just as a quick example and doesn't have a time or anything, just a date. The important bit is the comparison to see if the endDate has passed.
Tom