The getYear() method returns the full year number as an integer.
DayPilot.Date.getYear()This method has no parameters.
Use this method to read the year component of the current DayPilot.Date value.
const date = new DayPilot.Date("2025-03-15T08:30:00");
const year = date.getYear();