Twig documentation describes how to set the default date format for the date
filter:
$twig = new Twig_Environment($loader);
$twig->getExtension('core')->setDateFormat('d/m/Y', '%d days');
How can do this setting globally in Symfony2?
for Symfony 4 you can do this for those that need.
twig:
...
date:
format: c
timezone: UTC
....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With