The seconds() method returns the second component of the duration as an integer number of full seconds.
Declaration
DayPilot.Duration.seconds()Return Value
Returns the seconds part of the duration. The value contains full seconds only, so it is always an integer.
Notes
Use DayPilot.Duration.totalSeconds() when you need the entire duration converted to seconds instead of just the seconds component.
Example
const seconds = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:15.100").seconds(); // 15See Also
DayPilot.Duration.totalSeconds()
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot