Add days to NSDate

Submitted by:Andery Smith

Date added:28 May, 2012

Category:iPhone

How to add days to NSDate

Tags: nsdate

Code Snippet:

for (int i = 1; i < 30; i++) {

NSDate *newDate = [startDay.date dateByAddingTimeInterval:60*60*24*i];

MDay *day = [[MDay alloc] init];

day.date = newDate;

[list addObject:day];

}
 
 

Comments