Add or Subtract days, months, year or time from or to a Date – iPhone SDK
Use NSCalendar to define the calendar system (we use the standard gregorian calender)
Use NSDateComponents to add or subtract components(days, months, year or time) from or to date.
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *comps = [[NSDateComponents alloc] init]; [comps setMonth:-11]; // here setting the Month component to -11, so I am subtracting 11 months from the current date NSDate *toDate = [gregorian dateByAddingComponents:comps toDate: [NSDate date] options:0];


