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 |
const formatter = gantt.ext.formatters.durationFormatter();
//duration of the whole project
let duration = gantt.getSubtaskDuration();
console.log(formatter.format(duration));
//duration of the subproject
duration = gantt.getSubtaskDates(1);
console.log(formatter.format(duration));
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.