Ported relative date calculation fixes from Android to iOS

It's been a long time since I last did any iOS coding, and I only tested this on the simulator, so some third-party testing/code review may be required :grin:. 

Oh yeah, this fixes #195.