Calculation in a template

bart

Active member
I need to make a calculation in a template. I want to know how many hours ago the lastpost was written.

In a thread-list-item I have: {$thread.last_post_date}. So I would like to do something like this for every thread-list-item:

Code:
floor((the_current_time-{$thread.last_post_date})/3600)

is that possible?
 
Top Bottom