DayPilot.Duration.totalHours

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.5

See Also

DayPilot.Duration.hours()

DayPilot.Duration Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript