I want to check for the date and get the result in 4 Format TheDayBeforeYesterday,Yesterady,Today,Tomorrow.
I have One date and i want to compare that date with the current Date.
Right now i have done this but this is just give me the Day in positive number so i cant get the date is gone or will it still to come that date.
-(void)getDateDiffrenceForBirthday:(NSString *)strOriginalDate
{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];
NSDate *originalDate = [formatter dateFromString:strOriginalDate];
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *components = [calendar components:NSDayCalendarUnit
fromDate:originalDate
toDate:[NSDate date]
options:0];
NSLog(@"Days To Go %d",components.day);
}