From 08037d7846678531850d15ea62c1bc1ee247c448 Mon Sep 17 00:00:00 2001 From: Corban-Lee Jones Date: Sun, 29 Sep 2024 23:46:06 +0100 Subject: [PATCH] fix regex issue not matching correctly --- apps/home/static/home/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/home/static/home/js/index.js b/apps/home/static/home/js/index.js index 224c283..748f61e 100644 --- a/apps/home/static/home/js/index.js +++ b/apps/home/static/home/js/index.js @@ -30,7 +30,7 @@ function genHexString(len=6) { // region DateTime function isISODateTimeString(value) { - const isoDatePattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+([+-]\d{2}:\d{2}|Z)$/; + const isoDatePattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?([+-]\d{2}:\d{2}|Z)$/; return typeof value === 'string' && isoDatePattern.test(value); }