Replacing NSDate isGreaterThan: call with compare: call for iOS compatibility.