I would like to display current date on my site using Twig. The problem is {{ "now"|date("Y-m-d") }}
function which display me random month number like "2020-16-17". Every time when I rerun my Spring Boot program, the function shows different month number.
I solved my problem by change {{ "now"|date("Y-m-d") }}
to {{ "now"|date("Y-MM-d") }}
, "m" was showing minutes. Of course it is solution for Java.