The totalHours() method returns the duration converted to hours.
Declaration
DayPilot.Duration.totalHours()Return Value
Returns the duration converted to hours. If the duration includes minutes, seconds, or milliseconds, the result is a fractional number.
Example
const hours = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:00").totalHours(); // 108.5See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot