Posted By

rabc on 07/24/10


Tagged

date iphone


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

umang_nine
bobbym245
rvachere
sb
cnathan


Add days to a NSDate


 / Published in: Objective C
 

URL: http://www.drobnik.com/touch/2009/05/adding-days-to-nsdate/

  1. NSDate *now = [NSDate date];
  2. int daysToAdd = 50; // or 60 :-)
  3. NSDate *newDate1 = [now addTimeInterval:60*60*24*daysToAdd];
  4. NSLog(@"Quick: %@", newDate1);

Report this snippet  

You need to login to post a comment.