Skip to main content

Class Calendar

Work calendar

Inheritance

↳ object

    Calendar

Implements

ICalendar

Inherited Members

Equals(object, object)

GetType()

MemberwiseClone()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Runtime.Calendars

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public class Calendar : ICalendar

Properties

Name

Name of the calendar

Declaration
public string Name { get; set; }
Property value
TypeDescription
string

WorkingHours

Working hours. Default 8 hours.

Declaration
public TimeSpan WorkingHours { get; set; }
Property value
TypeDescription
TimeSpan

StartOfWork

The beginning of the work day

Declaration
public TimeSpan StartOfWork { get; set; }
Property value
TypeDescription
TimeSpan

Weekends

Days of the week for weekends

Declaration
public List<DayOfWeek> Weekends { get; set; }
Property value
TypeDescription
List<DayOfWeek>

Years

Settings for years Year

Declaration
public Dictionary<int, Year> Years { get; set; }
Property value
TypeDescription
Dictionary<int, Year>

Methods

IsWorkday(DateTime)

Checking whether the day is a working day

Declaration
public bool IsWorkday(DateTime day)
Parameters
TypeNameDescription
DateTimedayDateTime instance
Returns
TypeDescription
booltrue if day is workday, false otherwise

GetRestOfWorkday(DateTime)

Get the rest of the workday

Declaration
public TimeSpan GetRestOfWorkday(DateTime day)
Parameters
TypeNameDescription
DateTimedayDateTime instance
Returns
TypeDescription
TimeSpanTimeSpan with the rest of the work day

GetStartOfWorkday(DateTime)

Get the start of the workday

Declaration
public TimeSpan GetStartOfWorkday(DateTime day)
Parameters
TypeNameDescription
DateTimedayDateTime instance
Returns
TypeDescription
TimeSpanStart of the workday

Create(string)

Create instance of the calendar

Declaration
public static Calendar Create(string name)
Parameters
TypeNameDescription
stringnameName of the calendar
Returns
TypeDescription
Calendar

Equals(object)

Declaration
public override bool Equals(object obj)
Parameters
TypeNameDescription
objectobj
Returns
TypeDescription
bool

GetHashCode()

Declaration
public override int GetHashCode()
Returns
TypeDescription
int

Extension Methods