The daysInYear() method returns the number of days in the specified year.
DayPilot.Date.daysInYear();
The number of days.
var numberOfDaysIn2020 = new DayPilot.Date("2020-02-01").daysInYear(); // 366