The totalHours() method returns the duration converted to hours.
DayPilot.Duration.totalHours()Returns the duration converted to hours. If the duration includes minutes, seconds, or milliseconds, the result is a fractional number.
const hours = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:00").totalHours(); // 108.5