The clone() method returns a new DayPilot.Date object with the same value.
DayPilot.Date.clone()Returns a new DayPilot.Date instance representing the same point in time.
This method is obsolete. DayPilot.Date objects representing the same point in time are identical, so cloning is unnecessary.
const copy = new DayPilot.Date("2025-03-10").clone();