calculates the duration of a task
config | object | the configuration object of a time span |
number | the duration of a task in units specified by the duration_unit option |
gantt.config.work_time = true;
gantt.init("gantt_here");
// calculate worktime duration between specified dates
// (for specific task, if multiple working calendars used)
gantt.calculateDuration({
start_date: new Date(2013,02,15),
end_date: new Date(2013,02,25)
/*,task: task*/
});
// or
gantt.calculateDuration(task);
// or
gantt.calculateDuration(new Date(2013,02,15), new Date(2013,02,25)); //->6
If the work_time option is enabled, the method calculates the task's duration in working time.
The configuration object can contain the following properties: