I would like to subtract 4 hours from a date. I read the date string into an NSDate object use the following code:
NSDateFormatter * dateFormatter = [[[NSDat
Since iOS 8 there is the more convenient dateByAddingUnit:
dateByAddingUnit
Swift 2.x
//subtract 3 hours let calendar = NSCalendar.autoupdatingCurrentCalendar() newDate = calendar.dateByAddingUnit(.Hour, value: -3, toDate: originalDate, options: [])