DurationCalculator - calcScheduleDuration(String startTime, String endTime)

Gets the actual duration between startTime and endTime within the already-specified schedule and optionally overridden timezone. Sets this.endDateTime (for completeness), this.seconds, and this.totalSeconds.

Sets this.endDateTime (for completeness), this.seconds, and this.totalSeconds.

Table 1. Parameters
Name Type Description
startTime String The start time. If not provided the current value is used (set using setStartDateTime()).
endTime String The end time. If not provided the current value is used (set using setEndDateTime()).
Table 2. Returns
TypeDescription
NumberThe schedule duration in seconds (same as calling getSeconds()). Returns 0 if endTime is before startTime.

var dc = new DurationCalculator();
gs.print(dc.calcScheduleDuration("2012-04-10 08:00:00","2012-04-14 06:00:00"));

*** Script: 338400