Add days to a NSDate


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. NSDate *now = [NSDate date];
  2. int daysToAdd = 50; // or 60 :-)
  3. NSDate *newDate1 = [now addTimeInterval:60*60*24*daysToAdd];
  4. NSLog(@"Quick: %@", newDate1);

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.