twig time functions code example
Example 1: display date time twig
// date
{{ post.published_at|date("m/d/Y") }}
// date time
{{ post.published_at|date('Y-m-d H:i:s') }}
Example 2: twig date month is not defined
{% set dateTime = date(article.date) %}
<span class="day">{{ dateTime | date('d') }}</span>
<span class="month">{{ dateTime | date('F') }}</span>
<span class="year">{{ dateTime | date('Y') }}</span>