DurationCalculator - calcRelativeDueDate(GlideDateTime start, Number days, String endTime)

Calculates the due date starting at start and adding days using the schedule and time zone.

Called from relative duration definitions, initiated by calcRelativeDuration(), as calculator.calcRelativeDueDate(calculator.startDateTime, days). When the day that the work is due is found, sets the time to endTime of that day. If there are not enough days left in the schedule, uses the last day in the schedule.

Table 1. Parameters
Name Type Description
start GlideDateTime Start datetime for the computation.
days Number Number of days to add to the start datetime.
endTime String Time due of the computed day due in "hh:mm:ss" format, or blank to indicate the end of the work day
Table 2. Returns
BooleanTrue if the completion date is within the schedule. False if the completion date falls outside the schedule. Undefined if no schedule was set prior to calling this method.
var dc = new DurationCalculator();
dc.calcRelativeDueDate("2012-04-10 08:00:00", 2, "08:00:00")