{# {{ value|date('U')}} #}

{% if value is not null %}
{% if field_options is not defined or field_options.format == "d/m/Y h:i A e" or field_options.format == null %}
    {% set format = "d/m/Y H:i" %}
{% else %}
    {% set format = field_options.format %}
{% endif %}
<time data-timestamp="{{ value|date('U') }}" title="{{ value|date('r') }}">{{ value|date(format) }}</time>
{% else %}
    <span class="badge badge-secondary">Non défini</span>
{% endif %}
