Jump to content

timestamp question


ColdEdge

Recommended Posts

Allright, here is the thing. I want to display user post/comment... ect.. ect in a manner that shows something 5 hours ago1 minute ago2 days ago1 month ago1 year agohow would I be able to do this?currently its displayed as: 07-10-10, 04:42 PM

Link to comment
Share on other sites

Convert the string into a timestamp (using strtotime()), get the current time (using time()), calculate the difference and convert that into the format you want (you'll have to write your own function for that part).

Link to comment
Share on other sites

This may work for you:http://psoug.org/snippet/Get-Relative-Date...d-Times_943.htm

Allright, here is the thing. I want to display user post/comment... ect.. ect in a manner that shows something 5 hours ago1 minute ago2 days ago1 month ago1 year agohow would I be able to do this?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...