use local date format
[bdrem.git] / src / bdrem / Renderer.php
index a8da7a1efe57e25458ee73572648b3e460aa62d2..363d413de11ae6923a62a7ba50892096f24dae33 100644 (file)
@@ -13,6 +13,24 @@ abstract class Renderer
         echo $this->render($arEvents);
     }
 
+    public function handleStopOnEmpty()
+    {
+    }
+
     abstract public function render($arEvents);
+
+    protected function getLocalDate($dateStr)
+    {
+        if ($dateStr{0} != '?') {
+            return strftime('%x', strtotime($dateStr));
+        }
+
+        $dateStr = str_replace('????', '1899', $dateStr);
+        return str_replace(
+            array('1899', '99'),
+            array('????', '??'),
+            strftime('%x', strtotime($dateStr))
+        );
+    }
 }
 ?>