From 5e9d7e38aaa5e9e094a2fee5b8c5877e172079ef Mon Sep 17 00:00:00 2001 From: Afr Schoe <58883403+q9f@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:51:57 +0200 Subject: [PATCH] fix tests --- data/23/events/_example/index.toml | 2 +- data/23/events/protocol/index.toml | 2 +- data/23/events/protocol/{photo.png => logo.png} | Bin utils/engine.js | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) rename data/23/events/protocol/{photo.png => logo.png} (100%) diff --git a/data/23/events/_example/index.toml b/data/23/events/_example/index.toml index 951d403f..05283d32 100644 --- a/data/23/events/_example/index.toml +++ b/data/23/events/_example/index.toml @@ -38,7 +38,7 @@ date = "2023-06-09" days = 3 # the event times (shows up in the event card) -times = "09:00 - 20:00" +times = "09:00-20:00" # Link to venues from the Places table - use this OR enter venueName, venueUrl and venueAddress # venues = ["gabriel-loci"] diff --git a/data/23/events/protocol/index.toml b/data/23/events/protocol/index.toml index 86212eda..a5c45f5d 100644 --- a/data/23/events/protocol/index.toml +++ b/data/23/events/protocol/index.toml @@ -38,7 +38,7 @@ date = "2023-09-15" days = 1 # the event times (shows up in the event card) -times = "08:00 - 21:00" +times = "08:00-21:00" # Link to venues from the Places table - use this OR enter venueName, venueUrl and venueAddress venues = ["magazin"] diff --git a/data/23/events/protocol/photo.png b/data/23/events/protocol/logo.png similarity index 100% rename from data/23/events/protocol/photo.png rename to data/23/events/protocol/logo.png diff --git a/utils/engine.js b/utils/engine.js index ceedf462..209cf342 100644 --- a/utils/engine.js +++ b/utils/engine.js @@ -232,11 +232,11 @@ class DeConf_Collection { continue; } const [sstart, send] = sg.times.split("-"); - sg.startTime = (new Date(`${sg.date}T${sstart}`)).toISOString(); + sg.startTime = (new Date(`${sg.date}T${sstart.trim()}`)).toISOString(); const endDate = send <= sstart ? format(addDays(new Date(sg.date), 1), "yyyy-MM-dd") : sg.date; - sg.endTime = (new Date(`${endDate}T${send}`)).toISOString(); + sg.endTime = (new Date(`${endDate}T${send.trim()}`)).toISOString(); } } if (