The seconds() method returns the second component of the duration as an integer number of full seconds.
DayPilot.Duration.seconds()Returns the seconds part of the duration. The value contains full seconds only, so it is always an integer.
Use DayPilot.Duration.totalSeconds() when you need the entire duration converted to seconds instead of just the seconds component.
const seconds = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:15.100").seconds(); // 15