VIVO-921: tweaked the regular expressions
This commit is contained in:
parent
c47964fbde
commit
749a8ff8ad
1 changed files with 3 additions and 3 deletions
|
@ -19,12 +19,12 @@
|
|||
<#if theValue?contains("<p>") >
|
||||
<#assign theValue = theValue?replace("<p>","<p style='margin-bottom:.6em'>") />
|
||||
</#if>
|
||||
<#if theValue?matches("^(10-20)\\d\\d[- \\/.](0[1-9]|1[012])[- \\/.](0[1-9]|[12][0-9]|3[01])$") >
|
||||
<#if theValue?matches("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})") >
|
||||
<#assign theValue = theValue + "T00:00:00" />
|
||||
${dt.formatXsdDateTimeLong(theValue, "yearMonthDayPrecision")}
|
||||
<#elseif theValue?matches("^(10-20)\\d{2}(-|\\/)((0[1-9])|(1[0-2]))(-|\\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])")>
|
||||
<#elseif theValue?matches("^([0-9]{4})-((0[1-9])|(1[0-2]))-((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])")>
|
||||
${dt.formatXsdDateTimeLong(theValue, "yearMonthDayTimePrecision")}
|
||||
<#elseif theValue?matches("^((10-20)\\d\\d+)-(0[1-9]|1[012])")>
|
||||
<#elseif theValue?matches("^([0-9]{4})-(0[1-9]|1[012])")>
|
||||
<#assign theValue = theValue + "-01T00:00:00" />
|
||||
${dt.formatXsdDateTimeLong(theValue, "yearMonthPrecision")}
|
||||
<#elseif theValue?matches("^--(0[1-9]|1[012])")>
|
||||
|
|
Loading…
Add table
Reference in a new issue