Twig Components / Methods / date
date(format = null, timezone = null)
is a Twig filter to output a readable version of a timestamp.
{{ content.datecreated|date("M d, ’y")}}
See the various options for 'date' on the PHP website.
Note: This filter does not display a localized version of the date. Use the
{{ localdate }}
-filter if you want to display dates in other languages than English.
Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.