Twig seems not recongnize the "%l" format to display minutes with leading zero.
The Twig documentation said "when the filtered data is of type DateInterval, when the format must conform to DateInterval::format".
So, if I read correctly the PHP documentation I must use "%l
" to have minutes with leading zero but this format is not recongnized by Twig who output "%l
" instead of the value. If I use "%i
" instead of "%l
" I have the correct value, but without the leading zero.
duration
is an DateInterval object (correctly set to 6 minutes for example)
{{ duration|date('%i') }} --> output "6"
{{ duration|date('%l') }} --> output "%l" instead of "06"
I don't understand what is wrong...