0
votes

I have trawled the docs, but cannot find a a helper to reset the time of a Luxon DateTime.

I can start with a standard date:

export const getDateOnly = (date: Date = new Date()) =>  new Date(
  date.getFullYear(),
  date.getMonth(),
  date.getDate()
)

export const today = () => DateTime.fromJSDate(getDateOnly());

but this seems like a common scenario and I might have just missed it?

1

1 Answers