GanttWorkCalendar
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Defines non-working weekdays and holiday dates for scheduling and critical-path duration.
- C#
- VB.NET
public class GanttWorkCalendar
Public Class GanttWorkCalendar
- Weekends Gets or sets excluded weekdays. At least one day must remain working.
- Holidays Gets or sets excluded dates; time components are ignored.
Example:
gantt.WorkCalendar.Holidays = new[] { new DateTime(2026, 12, 25) };
Constructors
GanttWorkCalendar()
Initializes a new instance of GanttWorkCalendar.
Properties
Holidays
DateTime[]: Gets or sets excluded dates; time components are ignored.
Weekends
DayOfWeek[]: Gets or sets excluded weekdays. At least one day must remain working.
Methods
AddWorkingDays(date, days)
Advances by working days, skipping weekends and holidays. Zero returns the supplied date.
| Parameter | Type | Description |
|---|---|---|
| date | DateTime | The date passed to the operation. |
| days | Int32 | The days passed to the operation. |
Returns: DateTime.
IsWorkingDay(date)
Returns whether a date is neither a weekend nor a holiday.
| Parameter | Type | Description |
|---|---|---|
| date | DateTime | The date passed to the operation. |
Returns: Boolean.
NextWorkingDay(date)
Returns the first working date on or after the supplied date.
| Parameter | Type | Description |
|---|---|---|
| date | DateTime | The date passed to the operation. |
Returns: DateTime.
WorkingDays(start, end)
Counts working dates in the half-open interval [start, end).
| Parameter | Type | Description |
|---|---|---|
| start | DateTime | The start passed to the operation. |
| end | DateTime | The end passed to the operation. |
Returns: Int32.