or azran or azran - 9 months ago 51
iOS Question

How to add one month to an NSDate?

How To Add Month To NSDate Object?

NSDate *someDate = [NSDate Date] + 30Days.....;


You need to use NSDateComponents:

NSDateComponents *dateComponents = [[NSDateComponents alloc] init];
[dateComponents setMonth:1];
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDate *newDate = [calendar dateByAddingComponents:dateComponents toDate:originalDate options:0];
[dateComponents release]; // If ARC is not used, release the date components