Hello I am new to iPhone development and I am making an app which recieves the date and time from web services like this 2012-02-23T00:14:13.853. I then need to show how old the information is according to the current date.
What I want is a relative time such as in Facebook or Twitter, e.g. 1 day ago, 2 hours ago etc.
So how should we convert that date into such a format?
You can use Shubhank’s code above, but you will have to convert your string into an NSDate first. In case you don’t know how to do this:
You can then use the resulting NSDate in the code above.