I am trying to convert a NSString to a date, add a day to it, then convert back to a string.
My code so far is this:
//convert curDate (from @property declaration) to NSDate
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"dd-MM-yyyy"];
NSDate *dateFromString = [[NSDate alloc] init];
dateFromString = [dateFormatter dateFromString:curDate];
//add a day
dateFromString = [dateFromString dateByAddingTimeInterval:60*60*24*1];
//convert back to string (for use in URL string concatenation)
NSString *dateDisplay = [dateFormatter stringFromDate:dateFromString];
//set curDate to new date
curDate = dateDisplay;
It crashes to the stack at:
0x117f09b: movl 8(%edx), %edi
(not sure if that's useful).
Can anyone say why this is?
Thanks!