how can I compare two dates return number of days. Ex: Missing X days of the Cup. look my code.
NSDateFormatter *df = [[NSDateFormatter alloc]init];
[d
From Apple's example, basically use an NSCalendar:
NSDate * date1 = ;
NSDate * date2 = <...>;
NSCalendar *gregorian = [[NSCalendar alloc]
initWithCalendarIdentifier:NSGregorianCalendar];
NSUInteger unitFlags = NSMonthCalendarUnit | NSDayCalendarUnit;
NSDateComponents *components = [gregorian components:unitFlags
fromDate:date1
toDate:date2 options:0];
NSInteger months = [components month];
NSInteger days = [components day];