Remove leftover debugging
This commit is contained in:
parent
1d0f08d3f0
commit
cb4abfa38e
|
|
@ -8,8 +8,6 @@ import { Temporal } from '@js-temporal/polyfill'
|
||||||
export const convertTimesToDates = (times: string[], timezone: string): Temporal.ZonedDateTime[] => {
|
export const convertTimesToDates = (times: string[], timezone: string): Temporal.ZonedDateTime[] => {
|
||||||
const isSpecificDates = times[0].length === 13
|
const isSpecificDates = times[0].length === 13
|
||||||
|
|
||||||
console.log(times)
|
|
||||||
|
|
||||||
return times.map(time => isSpecificDates ?
|
return times.map(time => isSpecificDates ?
|
||||||
parseSpecificDate(time).withTimeZone(timezone)
|
parseSpecificDate(time).withTimeZone(timezone)
|
||||||
: parseWeekdayDate(time, timezone).withTimeZone(timezone)
|
: parseWeekdayDate(time, timezone).withTimeZone(timezone)
|
||||||
|
|
@ -47,7 +45,7 @@ const parseWeekdayDate = (str: string, timezone: string): Temporal.ZonedDateTime
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct PlainDateTime from today
|
// 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 dayDelta = dayOfWeek - today.dayOfWeek
|
||||||
const resultDay = today.add({ days: dayDelta })
|
const resultDay = today.add({ days: dayDelta })
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue