Scoped GlideDuration - subtract(GlideDuration duration)

Subtracts the specified duration from the current duration.

Table 1. Parameters
Name Type Description
duration GlideDuration The duration to subtract.
Table 2. Returns
Type Description
void
var duration = new GlideDuration('3 12:00:00');
var duration2 = new GlideDuration('3:00:00');
var answer = duration.subtract(duration2);
gs.info(answer.getDisplayValue());
Output:
3 Days 9 Hours