import { dt } from "@/lib/dt"

import type { DateTime } from "ics"

export function generateDateTime(d: Date): 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(),
  ]
}
