ydate (Smarty extension function)

ydate is a Smarty extension function that formats a date or time value according to certain rules:

(where "time" is the diffeence between the current time and the time of the item - usually the creation date/time). The language strings are all configurable in the language file (lang/en_us.ini) but the numbers are actually hard-coded in the Smarty function.

Example:

    {$doc_created|ydate:"%Y-%m-%d %H:%S"}