From 77b3ab1099df0762deef30b1cb6a48f76e13c0a1 Mon Sep 17 00:00:00 2001
From: Jake <j.vondoemming@stud.uni-goettingen.de>
Date: Mon, 3 Oct 2022 05:42:15 +0200
Subject: [PATCH] Use formatted dates on site

---
 lang.json                 |  2 ++
 theme/templates/page.html | 12 ++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lang.json b/lang.json
index b841263..21503f1 100644
--- a/lang.json
+++ b/lang.json
@@ -15,9 +15,11 @@
 			"suffix": "",
 			"alt": ""
 		},
+		"date_format": "%d.%m.%Y %H:%M Uhr",
 		"page": {
 			"published_prefix": "Veröffentlicht am: ",
 			"published_suffix": "",
+			"published_suffix": "",
 			"modified_prefix": "Zuletzt geändert: ",
 			"modified_suffix": "",
 			"authors_prefix": "Author(en): ",
diff --git a/theme/templates/page.html b/theme/templates/page.html
index c9babb4..05e5017 100644
--- a/theme/templates/page.html
+++ b/theme/templates/page.html
@@ -38,16 +38,16 @@
 
 		<div>
 			{{ t[l].page.published_prefix }}
-			<abbr title="{{ page.date_created.isoformat() }}">
-				{{ page.date_created.isoformat() }}
-			</abbr>
+			<time datetime="{{ page.date_created.isoformat() }}">
+				{{ page.date_created.strftime(t[l].date_format) }}
+			</time>
 			{{ t[l].page.published_suffix }}
 		</div>
 
 		<div>{{ t[l].page.modified_prefix }}
-			<abbr title="{{ page.date_modified.isoformat() }}">
-				{{ page.date_modified.isoformat() }}
-			</abbr>
+			<time datetime="{{ page.date_modified.isoformat() }}">
+				{{ page.date_modified.strftime(t[l].date_format) }}
+			</time>
 			{{ t[l].page.modified_suffix }}
 		</div>
 
-- 
GitLab