It seems that I can\'t subtract 7 days from the current date. This is how i am doing it:
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:N
use dateByAddingTimeInterval method:
NSDate *now = [NSDate date]; NSDate *sevenDaysAgo = [now dateByAddingTimeInterval:-7*24*60*60]; NSLog(@"7 days ago: %@", sevenDaysAgo);
output:
7 days ago: 2012-04-11 11:35:38 +0000
Hope it helps