Skip to main content
Version: 4.2

GanttWorkCalendar

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Defines non-working weekdays and holiday dates for scheduling and critical-path duration.

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​

Instance member GanttWorkCalendar()​

Initializes a new instance of GanttWorkCalendar.

Properties​

Instance member Holidays​

DateTime[]: Gets or sets excluded dates; time components are ignored.

Instance member Weekends​

DayOfWeek[]: Gets or sets excluded weekdays. At least one day must remain working.

Methods​

Instance member AddWorkingDays(date, days)​

Advances by working days, skipping weekends and holidays. Zero returns the supplied date.

ParameterTypeDescription
dateDateTimeThe date passed to the operation.
daysInt32The days passed to the operation.

Returns: DateTime.

Instance member IsWorkingDay(date)​

Returns whether a date is neither a weekend nor a holiday.

ParameterTypeDescription
dateDateTimeThe date passed to the operation.

Returns: Boolean.

Instance member NextWorkingDay(date)​

Returns the first working date on or after the supplied date.

ParameterTypeDescription
dateDateTimeThe date passed to the operation.

Returns: DateTime.

Instance member WorkingDays(start, end)​

Counts working dates in the half-open interval [start, end).

ParameterTypeDescription
startDateTimeThe start passed to the operation.
endDateTimeThe end passed to the operation.

Returns: Int32.