The daysInYear() method returns the number of days in the specified year.
DayPilot.Date.daysInYear()
Returns the number of days in the year of the current date.
const numberOfDaysIn2020 = new DayPilot.Date("2020-02-01").daysInYear(); // 366
DayPilot.Date Class
Availability of this API item in DayPilot editions: