How can I calculate the time difference (in seconds) from now to a specific day and hour (e.g. 6 PM on the 20th day of next month)?
I tried a lot, but didn't succeed in finding an easy solution without calculating a lot and checking lots of different cases.
NSDate *now = [NSDate date];
NSDateComponents *dc = [[NSDateComponents alloc] init];
[dc setMonth:1];
MyTargetDateObject = [[NSCalendar currentCalendar] dateByAddingComponents:dc toDate:now options:0];
[dc release];
..just adds 1 month from now. The other examples e.g. here don't seem to apply somehow.