From cb4abfa38e22215b71e206135d5c888fdf627c17 Mon Sep 17 00:00:00 2001 From: Ewan Breakey Date: Wed, 2 Aug 2023 23:05:45 +1000 Subject: [PATCH] Remove leftover debugging --- frontend/src/utils/convertTimesToDates.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/utils/convertTimesToDates.ts b/frontend/src/utils/convertTimesToDates.ts index 95bd967..cd9f741 100644 --- a/frontend/src/utils/convertTimesToDates.ts +++ b/frontend/src/utils/convertTimesToDates.ts @@ -8,8 +8,6 @@ import { Temporal } from '@js-temporal/polyfill' export const convertTimesToDates = (times: string[], timezone: string): Temporal.ZonedDateTime[] => { const isSpecificDates = times[0].length === 13 - console.log(times) - return times.map(time => isSpecificDates ? parseSpecificDate(time).withTimeZone(timezone) : parseWeekdayDate(time, timezone).withTimeZone(timezone) @@ -43,11 +41,11 @@ const parseWeekdayDate = (str: string, timezone: string): Temporal.ZonedDateTime const [hour, minute] = [Number(str.substring(0, 2)), Number(str.substring(2, 4))] let dayOfWeek = Number(str.substring(5)) if (dayOfWeek === 0) { - dayOfWeek = 7 // Sunday is 7 in ISO8601 + dayOfWeek = 7 // Sunday is 7 in ISO8601 } // Construct PlainDateTime from today - const today = Temporal.Now.zonedDateTimeISO('Utc').round('day') + const today = Temporal.Now.zonedDateTimeISO('UTC').round('day') const dayDelta = dayOfWeek - today.dayOfWeek const resultDay = today.add({ days: dayDelta })