DayPilot.Duration.days

The days() method returns the day component of the duration as an integer number of full days.

Declaration

DayPilot.Duration.days()

Return Value

Returns the day part of the duration. The value contains full days only, so it is always an integer.

Notes

Use DayPilot.Duration.totalDays() when you need the entire duration converted to days instead of just the day component.

Example

const days = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:00:00").days(); // 4

See Also

DayPilot.Duration.totalDays()

DayPilot.Duration Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript