From 0bfbbccdc26e9b6f0de47ab9adb822eb916b5a94 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Thu, 3 Oct 2024 14:35:10 +0300 Subject: [PATCH] UHF-10745: Hide article timestamp --- .../module/helfi-news-item/node--news-item.html.twig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/module/helfi-news-item/node--news-item.html.twig b/templates/module/helfi-news-item/node--news-item.html.twig index 359f0cba1..4c4e1cfc8 100644 --- a/templates/module/helfi-news-item/node--news-item.html.twig +++ b/templates/module/helfi-news-item/node--news-item.html.twig @@ -30,7 +30,15 @@ {{ published_at|format_date('publication_date_format') }} - {% if modified_at is not empty %} + {# + UHF-10745: Hide modified field if it is in between timestamps when we + updated all news articles. Data between these intervals is useless. + #} + {% if modified_at is not empty and ( + modified_at < date('2024-09-25T14:30:00', 'Europe/Helsinki')|date('U') or + modified_at > date('2024-09-25T15:15:00', 'Europe/Helsinki')|date('U') + ) + %} {% set html_modified_at = modified_at|format_date('custom', 'Y-m-d') ~ 'T' ~ modified_at|format_date('custom', 'H:i') %}