I'm trying to display a date using the date
action, but it's giving odd output.
{{ mydate | date:'mm/dd/yyyy' }}
The month seems to be inconsistent and incorrect. What's wrong here?
I'm trying to display a date using the date
action, but it's giving odd output.
{{ mydate | date:'mm/dd/yyyy' }}
The month seems to be inconsistent and incorrect. What's wrong here?
You need to use MM
to display the month:
{{ mydate | date:'MM/dd/yyyy' }}
From the documentation
'MM': Month in year, padded (01-12)
...
'mm': Minute in hour, padded (00-59)
You need to use date:'MM/dd/yyy'
mm
is for minutes, MM
is for months