From 9115e0483735d63ba545a7bf3f4734c4c093f5d6 Mon Sep 17 00:00:00 2001 From: Suppenhuhn79 <60477275+Suppenhuhn79@users.noreply.github.com> Date: Mon, 6 May 2024 10:31:13 +0200 Subject: [PATCH] min: proper formatting of date values --- pagesnippets2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pagesnippets2.js b/pagesnippets2.js index 6867917..ff6ed28 100644 --- a/pagesnippets2.js +++ b/pagesnippets2.js @@ -334,7 +334,7 @@ let pageSnippets = new function () while (!!rexResult) { let value = _getObjectValueByPath(data, rexResult[1]) ?? ""; - result = result.replace(rexResult[0], value); + result = result.replace(rexResult[0], (value instanceof Date) ? value.toISOString() : value.toString()); rexResult = rex.exec(text); } return result;