DayPilot.Duration.hours

The hours() method returns the hour part of the duration.

Declaration

DayPilot.Duration.hours();

Return Value

The hour part of the duration. It returns the number of full hours - it is always an integer value.

See Also

Example

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