/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Display the date in a friendly manner */ function subtleDate ($time, $day_limit = 5, $long_format = 'M j') { $_DAY = 60*60*24; switch ($diff) { case ($diff < $_DAY): return 'Today'; case ($diff < $_DAY*2): return 'Yesterday'; } }
URL: http://kawika.org