Files
web/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/Actions/helpers.ts
Tobias Johansson 002d5f9c68 Merged in fix/SW-3078-wrong-dates-time-zones (pull request #2388)
fix(SW-3078): change to string instead of Date in Zod schema

* fix(SW-3078): change to string instead of Date in Zod schema


Approved-by: Michael Zetterberg
Approved-by: Linus Flood
2025-06-18 10:55:05 +00:00

16 lines
293 B
TypeScript

import { dt } from "@/lib/dt"
import type { DateTime } from "ics"
export function generateDateTime(d: string): DateTime {
const _d = dt(d).utc()
return [
_d.year(),
// Need to add +1 since month is 0 based
_d.month() + 1,
_d.date(),
_d.hour(),
_d.minute(),
]
}