PHP Warning: mysql_query(): Access denied for user 'vhelpf'@'localhost' (using password: NO) in ..../includes/class_postbit.php(265) : eval()'d code on line 2

PHP Warning: mysql_query(): A link to the server could not be established in ..../includes/class_postbit.php(265) : eval()'d code on line 2

PHP Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in ..../includes/class_postbit.php(265) : eval()'d code on line 3
Vista Help Forum - View Single Post - Looking for a date/time formating function
View Single Post
  #1  
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