View Single Post
Old 08-01-2007
cpearson's Avatar
cpearson cpearson is offline
Agent - Level 3
Join Date: Dec 2006
Posts: 281
cpearson is on a distinguished road
Default Looking for a date/time formating function

I am looking for a function to convert a date and time to a "pretty print" format like the format this forum displays.

11 minutes ago
6 hours ago
2 days ago
1 week ago

The function would have to find the difference in the current date/time and the passed data/time value. Then it would have to test for minute(s),hour(s),day(s),week(s) cases. I am too lazy to write this function so if you know a good one post it here. Before anyone asks, I looked through vbulletin (this system) code but gave up.

Reply With Quote