From 2c3f79d70025742d4040bd8a6f9d2a9b5eb71b4d Mon Sep 17 00:00:00 2001 From: Fabian Steeg Date: Mon, 10 Oct 2022 18:04:25 +0200 Subject: [PATCH] Show `dateModified` in UI (#244) --- app/models/AuthorityResource.java | 4 ++++ app/views/details.scala.html | 1 + 2 files changed, 5 insertions(+) diff --git a/app/models/AuthorityResource.java b/app/models/AuthorityResource.java index 4f7d584..0aab437 100644 --- a/app/models/AuthorityResource.java +++ b/app/models/AuthorityResource.java @@ -468,4 +468,8 @@ private static String year(JsonNode node) { String text = node.elements().next().asText(); return text.matches("\\d{4}-\\d{2}-\\d{2}") ? text.split("-")[0] : text; } + + public String dateModified() { + return json.findValue("dateModified").asText().split("T")[0]; + } } diff --git a/app/views/details.scala.html b/app/views/details.scala.html index 7a65260..e35644d 100644 --- a/app/views/details.scala.html +++ b/app/views/details.scala.html @@ -156,6 +156,7 @@ Turtle) @if(entityFacts){und EntityFacts (JSON-LD)} | CC0 + | @resource.dateModified

}}