DayPilot.Duration.totalHours

The totalHours() method returns the duration converted to hours.

Declaration

DayPilot.Duration.totalHours();

Return Value

The duration converted to hours. If the duration includes minutes, seconds or milliseconds the result will be a fractional number.

See Also

Example

var hours = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:00").totalHours();     // 108.5