vendor/sonata-project/intl-bundle/src/Resources/views/CRUD/display_datetime.html.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {%- apply spaceless %}
  8.     {%- if value is empty -%}
  9.         &nbsp;
  10.     {%- else -%}
  11.         {% set pattern = field_description.options.pattern|default(null) %}
  12.         {% set locale = field_description.options.locale|default(null) %}
  13.         {% set timezone = field_description.options.timezone|default(null) %}
  14.         {% set dateType = field_description.options.dateType|default(null) %}
  15.         {% set timeType = field_description.options.timeType|default(null) %}
  16.         <time datetime="{{ value|date('c', 'UTC') }}" title="{{ value|date('c', 'UTC') }}">{{ value | format_datetime(pattern, locale, timezone, dateType, timeType) }}</time>
  17.     {%- endif -%}
  18. {% endapply -%}