The hours() method returns the hour component of the duration as an integer number of full hours.
Declaration
DayPilot.Duration.hours()Return Value
Returns the hour part of the duration. The value contains full hours only, so it is always an integer.
Notes
Use DayPilot.Duration.totalHours() when you need the entire duration converted to hours instead of just the hour component.
Example
const hours = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:00").hours(); // 12See Also
DayPilot.Duration.totalHours()
External Drag and Drop of Tasks [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot