From a767a67db763e8901a4840a230143d57a3fb73b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 23 Jan 2015 12:02:31 +0100 Subject: [PATCH] localize date in report bundles: switch to twig intl extension refs #272 refs # Task #272 - Find a way to deal with date format automatically --- Resources/views/Report/list.html.twig | 2 +- Resources/views/Report/view.html.twig | 2 +- Resources/views/Search/results.html.twig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/views/Report/list.html.twig b/Resources/views/Report/list.html.twig index c142d7a6d..9495c920f 100644 --- a/Resources/views/Report/list.html.twig +++ b/Resources/views/Report/list.html.twig @@ -34,7 +34,7 @@ {% for report in reports %} - {% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %} + {% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %} {{ report.cFGroup.getName(app.request.locale) }} {{ 'View the report' | trans }} diff --git a/Resources/views/Report/view.html.twig b/Resources/views/Report/view.html.twig index 68594b853..25a705339 100644 --- a/Resources/views/Report/view.html.twig +++ b/Resources/views/Report/view.html.twig @@ -33,7 +33,7 @@
{{ 'Date'|trans }}
-
{{ entity.date|date('d-m-Y') }}
+
{{ entity.date|localizeddate('long', 'none') }}
{{ 'User'|trans }}
{{ entity.user }}
{{ 'Report type'|trans }}
diff --git a/Resources/views/Search/results.html.twig b/Resources/views/Search/results.html.twig index df3b0cb43..f122e3e4d 100644 --- a/Resources/views/Search/results.html.twig +++ b/Resources/views/Search/results.html.twig @@ -33,7 +33,7 @@ {% for report in reports %} {{ report.person }} - {% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %} + {% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %} {{ report.cFGroup.getName|localize_translatable_string }} {{ 'View the report' | trans }}