returns the closest working time
| config | object | the configuration object or the date |
| Date | a Date object of the closest working time |
// checks whether the specified date is a working day in global settings
gantt.getClosestWorkTime({date:new Date(2019,04,26)});
// or
gantt.getClosestWorkTime(new Date(2019,04,26));
// checks whether the specified date is a working day for a specific task
gantt.getClosestWorkTime({ date: new Date(2019,04,26), task:task });
If the work_time option is disabled, the method returns the date unchanged.
The configuration object can contain the following properties:
| Property | Description |
|---|---|
| date | a date to get the closest working time for |
|
|
| dir | ('future' or 'past') specifies the direction of the closest time |
|
|
| unit | a time unit to search for the closest working time |
|
|
| task | optional, the object of the task the duration of which should be calculated |
|
|