datation according to unix epoche
authorDaniel Hromada <hromi@Aphrodité.(none)>
Sun, 12 Dec 2010 22:45:03 +0000 (23:45 +0100)
committerDaniel Hromada <hromi@Aphrodité.(none)>
Sun, 12 Dec 2010 22:45:03 +0000 (23:45 +0100)
wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php [new file with mode: 0644]

diff --git a/wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php b/wwwroot/inc/smarty/node_methodz/modifier.epochal_date.php
new file mode 100644 (file)
index 0000000..2087154
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+/*
+* Smarty plugin
+* -------------------------------------------------------------
+* Type: modifier
+* Name: epochal_date
+* Version: 0.23
+* Date: December 12, 2010
+* Author: Daniel Hromada
+* Purpose: let's consider the beginning of UNIX epoch to be more relevant to our current situation the birth of christ
+* Examples: {$smarty.now|epochal_date}
+* -------------------------------------------------------------
+*/
+function smarty_modifier_epochal_date($date) {
+   $year=date("Y",$date);
+   echo str_replace($year,$year-1970,date("d/m/Y",$date));
+   return $date;
+}
+?>
\ No newline at end of file
This page took 0.15201 seconds and 4 git commands to generate.