The hours() method returns the hour part of the duration.
DayPilot.Duration.hours();
The hour part of the duration. It returns the number of full hours - it is always an integer value.
var hours = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:00").hours(); // 12