Skip to content

Commit

Permalink
feature #2174 Use the HTML <time> element to display date and time re…
Browse files Browse the repository at this point in the history
…lated properties (javiereguiluz)

This PR was merged into the 1.x branch.

Discussion
----------

Use the HTML <time> element to display date and time related properties

Similar to what we recently did to Symfony: symfony/symfony#26520

Commits
-------

8677b5b Use the HTML <time> element to display date and time related properties
  • Loading branch information
javiereguiluz committed Mar 16, 2018
2 parents ca58e49 + 8677b5b commit a0a71b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Resources/views/default/field_date.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ value|date(field_options.format) }}
<time datetime="{{ value|date('c') }}" title="{{ value|date('r') }}">{{ value|date(field_options.format) }}</time>
2 changes: 1 addition & 1 deletion src/Resources/views/default/field_datetime.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ value|date(field_options.format) }}
<time datetime="{{ value|date('c') }}" title="{{ value|date('r') }}">{{ value|date(field_options.format) }}</time>
2 changes: 1 addition & 1 deletion src/Resources/views/default/field_datetimetz.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ value|date(field_options.format) }}
<time datetime="{{ value|date('c') }}" title="{{ value|date('r') }}">{{ value|date(field_options.format) }}</time>
2 changes: 1 addition & 1 deletion src/Resources/views/default/field_time.html.twig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ value|date(field_options.format) }}
<time>{{ value|date(field_options.format) }}</time>

0 comments on commit a0a71b4

Please sign in to comment.