When trying to get strtotime to work in volt i get this error:
Macro 'strtotime' does not exist
Service.php
$di->set('view', function () { $config = $this->getConfig();
$view = new View();
$view->setViewsDir($config->application->viewsDir);
$view->registerEngines([
'.volt' => function ($view) {
$config = $this->getConfig();
$volt = new VoltEngine($view, $di);
$volt->setOptions([
'compiledPath' => $config->application->cacheDir . 'volt/',
'compiledSeparator' => '_'
]);
$compiler = $volt->getCompiler();
$compiler->addFunction('strtotime', 'strtotime');
return $volt;
}
]);
return $view;
}, true);