You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**_config_** - (*Date | object*) - either a date to check or the [configuration object](api/gantt_isworktime.md#configurationobjectproperties) of a time span:
92
92
- **_date_** - (*Date*) - a date to check
93
93
- **_unit?_** - (*string*) - optional, a time unit: "minute", "hour", "day", "week", "month", "year"
94
-
- **_task?_** - (*Task*) - optional, the object of the task the duration of which should be calculated
95
94
-**_time_unit?_** - (*string*) - optional, a time unit: "minute", "hour", "day", "week", "month", "year". Not needed at all when the first parameter is specified as an object
- **_date_** - (*Date*) - a date to get the closest working time for
111
110
- **_dir?_** - (*string*) - optional, specifies the direction of the closest time: "future" or "past"
112
111
- **_unit?_** - (*string*) - optional, a time unit to search for the closest working time
113
-
- **_task?_** - (*Task*) - optional, the object of the task to use its calendar
114
112
115
113
~~~js
116
114
calendar.getClosestWorkTime(newDate(2025, 5, 6));
117
115
calendar.getClosestWorkTime({
118
116
date:newDate(2025, 5, 6),
119
-
unit:"hour",
120
-
task:gantt.getTask(2),
117
+
unit:"hour",
121
118
dir:"past"
122
119
});
123
120
~~~
124
121
122
+
125
123
- <spanclass=submethod>**calculateEndDate (config, duration, unit): Date**</span> - calculates the end date of a task
126
124
-**_config_** - (*Date | object*) - either the date when a task is scheduled to begin or the [configuration object](api/gantt_calculateenddate.md#configurationobjectproperties) of a time span:
127
125
- **_start_date_** - (*Date*) - the date when a task is scheduled to begin
128
126
- **_duration_** - (*number*) - the duration of a task
129
127
- **_unit?_** - (*string*) - optional, the time unit of the duration: "minute", "hour", "day", "week", "month", "year"
130
-
- **_task?_** - (*Task*) - optional, the object of the task the duration of which should be calculated
131
128
-**_duration?_** - (*number*) - optional, the duration of a task. Not needed at all when the first parameter is specified as an object
132
129
-**_unit?_** - (*string*) - optional, the time unit of the duration. Not needed at all when the first parameter is specified as an object<br>
133
130
@@ -144,7 +141,6 @@ calendar.calculateEndDate({
144
141
-**_config_** - (*Date | object*) - either the date when a task is scheduled to begin or the [configuration object](api/gantt_calculateduration.md#configurationobjectproperties) of a time span:
145
142
- **_start_date_** - (*Date*) - the date when a task is scheduled to begin
146
143
- **_end_date_** - (*Date*) - the date when a task is scheduled to be completed
147
-
- **_task?_** - (*Task*) - optional, the object of the task the duration of which should be calculated
148
144
-**_end?_** - (*Date*) - the date when a task is scheduled to be completed. Not needed at all when the first parameter is specified as an object<br>
0 commit comments