From dd02680588b2386207ad7fab389fc676a466e274 Mon Sep 17 00:00:00 2001 From: Daniel Hromada Date: Mon, 13 Dec 2010 00:00:19 +0100 Subject: [PATCH] new epoch --- wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php b/wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php index 2087154..b6a45f9 100644 --- a/wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php +++ b/wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php @@ -11,9 +11,10 @@ * Examples: {$smarty.now|epochal_date} * ------------------------------------------------------------- */ -function smarty_modifier_epochal_date($date) { +function smarty_modifier_epochal_date($d) { + $date=smarty_make_timestamp($d); $year=date("Y",$date); - echo str_replace($year,$year-1970,date("d/m/Y",$date)); - return $date; + return str_replace($year,$year-1970,date("d/m/Y",$date)); } + ?> \ No newline at end of file -- 2.30.2