Smarty - elapsed time since posted for an entry?
Posted: Fri May 23, 2008 12:32 am
Is it possible to know the difference between an entry's timestamp and the current time?
I'm working on a template that I would like to show the number of hours (and/or minutes) elapsed since the timestamp if the elapsed time is under a predetermined value (ie, perhaps less than 24 hours old)... and if greater than that value, show the timestamp as usual.
Ideas?
I'm working on a template that I would like to show the number of hours (and/or minutes) elapsed since the timestamp if the elapsed time is under a predetermined value (ie, perhaps less than 24 hours old)... and if greater than that value, show the timestamp as usual.
Ideas?