In the docs, Apple gives an example on how to add some hours and minutes to an existing date:
NSDate *today = [NSDate date];
NSDateComponents *offsetComponents = [[NSDateComponents alloc] init];
[offsetComponents setHour:1];
[offsetComponents setMinutes:30];
NSDate *endOfWorldWar3 = [gregorian dateByAddingComponents:comps toDate:today options:0];
But now, I have date which is printed out in 12h format with AM / PM (unicode standard format specifier is "a").
So I have an date object which is set to 8:00 'o clock, and now I want to switch that to PM or 20:00 'o clock. Hard to explain. NSDateComponents doesn't have a component for that.
The docs say that all these NSDateComponents things like hour, minute, day, etc. are in context with a calendar object. Makes sense. But I haven't found anything in NSCalender which would say "this is 12h format" or "this is 24h format".
So actually, what happens when I change the hour period? Isn't that actually just simple math to say "lets take 12 hours off, or lets add 12 hours"? Any idea?