PHP code example of teraone / twig-strftime-extension
1. Go to this page and download the library: Download teraone/twig-strftime-extension library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
teraone / twig-strftime-extension example snippets
// set your locale
setlocale(LC_ALL, 'de_DE');
$twig->addExtension(new Teraone\Twig\Extension\StrftimeExtension());
// optional: set Timezone
$twig->getExtension('core')->setTimezone('Europe/Berlin');