The totalSeconds() method returns the duration converted to seconds.
Declaration
DayPilot.Duration.totalSeconds()Return Value
Returns the duration converted to seconds. If the duration includes milliseconds, the result will be a fractional number.
Example
const seconds = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:15.100").totalSeconds(); // 390615.1See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot