calculates the combined duration of tasks nested in a project or another task.
task_id | string|number | the task's id, root_id will be used if not specified |
number | total duration of nested tasks |
//duration of the whole project
var duration = gantt.getSubtaskDuration();
console.log(duration + gantt.config.duration_unit + "s");
//duration of the subproject
var duration = gantt.getSubtaskDates(1);
console.log(duration + gantt.config.duration_unit + "s");
Calculates the combined duration of tasks nested in a project or another task.
Tasks of the project type are not counted in the total duration.
The return value is calculated in duration units from the config.