cannyboy
cannyboy

Reputation: 24426

Readable date from unix time stamp?

Starting out with an int variable unix time stamp (something like 1290341015), is there a way to get this into a nice human readable date string? The iPhone Mail app has the ideal display of date, where it shows the time or date in the context of the current time.

06:47       (a time today)
Yesterday   (received yesterday)
Friday      (received last Friday)
09/11/2010  (received more than a week ago)

Is there a way to approximate this?

Upvotes: 2

Views: 1392

Answers (1)

Gazler
Gazler

Reputation: 84140

This has been asked quite a few times before. The final link is the iphone specific one, the others a bit more general.

Upvotes: 4

Related Questions