The seconds() method returns the seconds part of the duration.
DayPilot.Duration.seconds();
The seconds part of the duration. It returns the number of full seconds - it is always an integer value.
var seconds = new DayPilot.Duration("2020-01-01T00:00:00", "2020-01-05T12:30:15.100").seconds(); // 15