I\'m using twig and when I apply the filter
{{tutoriel.dateCreation | localizeddate(\'medium\', \'none\') }}
on my datetime, I have this error :
I found the solution.
You should have the twig intl extension installed. if not, do composer require twig/extensions
You may activate the services in config.yml or services.yml file like that:
services:
twig.extension.intl:
class: Twig_Extensions_Extension_Intl
tags:
- { name: twig.extension }
i use a new twig filter format_date()
: https://twig.symfony.com/doc/2.x/filters/format_date.html
composer req twig/intl-extra
created_at|format_date('full')
created_at|format_date('full', '', null, 'gregorian', 'fr')
created_at|format_date('none', 'MMMM Y', null, 'gregorian', 'fr')