DurationCalculator - calcScheduleDuration(GlideDateTime startTime, GlideDateTime 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 GlideDateTime The start time. If not provided the current value is used (set using setStartDateTime()).
endTime GlideDateTime The end time. If not provided the current value is used (set using setEndDateTime()).
Table 2. Returns
TypeDescription
Number The schedule duration in seconds (same as calling getSeconds()). Returns 0 if endTime is before startTime.