From 58f3dcc9b333d8d5c44fec6e29a30d6961e9b33b Mon Sep 17 00:00:00 2001 From: neea Date: Wed, 1 Apr 2026 00:17:48 +0200 Subject: [PATCH] Make gigs with NaN start time be all day events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes so gigs that for instance say "kväll" as starting time show up as events from 00:00 to 24:00. Both calenders i tested on mark them as "all-day" events that show up at the top of a day --- src/utils/date.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/utils/date.ts b/src/utils/date.ts index 7e257f8b..be9bdb82 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -105,7 +105,14 @@ export const getGigCalenderDates = (gig: { const start = parseGigTime(gig.date, gig.start); if (!meetup && !start) { - return undefined; + const startOfDay = new Date(gig.date); + startOfDay.setUTCHours(0 - getSwedenHourOffset(startOfDay)); + const endOfDay = new Date(gig.date); + endOfDay.setUTCHours(24 - getSwedenHourOffset(endOfDay)); + return { + start: startOfDay, + end: endOfDay, + }; } else if (meetup && !start) { return { start: meetup,