Parse datetime objects as iso strings

This commit is contained in:
Koen Poelhekke 2023-05-15 16:09:15 +02:00
parent 0c65561bcb
commit 351b4e84c9

View File

@ -337,6 +337,17 @@
</#if>
<#local isDate = "">
<#attempt>
<#local isDate = object?is_date_like>
<#recover>
<#return "ABORT: Can't test if it's a date">
</#attempt>
<#if isDate>
<#return '"' + object?datetime?iso_utc + '"'>
</#if>
<#attempt>
<#return '"' + object?js_string + '"'>;
<#recover>