From 4905c10be060be51dc5c8d0de831c447f1275a2d Mon Sep 17 00:00:00 2001 From: Patrick McElwee Date: Tue, 30 Dec 2014 16:54:01 -0500 Subject: [PATCH] Allow getFormat function to accept qualified date precisions This allows the date precision to be a fully qualified URL, like "http://vivoweb.org/ontology/core#yearPrecision", while still accepting "yearPrecision" --- webapp/web/templates/freemarker/lib/lib-datetime.ftl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/web/templates/freemarker/lib/lib-datetime.ftl b/webapp/web/templates/freemarker/lib/lib-datetime.ftl index a84eaf72a..d2a92bc29 100644 --- a/webapp/web/templates/freemarker/lib/lib-datetime.ftl +++ b/webapp/web/templates/freemarker/lib/lib-datetime.ftl @@ -159,15 +159,15 @@ and the format type to determine how to display it. --> <#local format> <#if formatType == "long"> - <#if precision == "yearPrecision">yyyy - <#elseif precision == "yearMonthPrecision">MMMM yyyy - <#elseif precision == "yearMonthDayPrecision">MMMM d, yyyy + <#if precision?ends_with("yearPrecision")>yyyy + <#elseif precision?ends_with("yearMonthPrecision")>MMMM yyyy + <#elseif precision?ends_with("yearMonthDayPrecision")>MMMM d, yyyy <#else>MMMM d, yyyy h:mm a <#else> <#-- formatType == "short" --> - <#if precision == "yearPrecision">yyyy - <#elseif precision == "yearMonthPrecision">M/yyyy - <#elseif precision == "yearMonthDayPrecision">M/d/yyyy + <#if precision?ends_with("yearPrecision")>yyyy + <#elseif precision?ends_with("yearMonthPrecision")>M/yyyy + <#elseif precision?ends_with("yearMonthDayPrecision")>M/d/yyyy <#else>M/d/yyyy h:mm a