Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

Class CalendarExtensions

Inheritance

↳ object

    ↳ CalendarExtensions

Inherited Members

Equals(object)

Equals(object, object)

GetHashCode()

GetType()

MemberwiseClone()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Runtime.Calendars

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public static class CalendarExtensions

Methods

GetInterval(ICalendar, string, DateTime)

Calculate the time interval

Declaration
public static TimeSpan GetInterval(this ICalendar calendar, string value, DateTime startDateTime)
Parameters
TypeNameDescription
ICalendarcalendarCalendar instance
stringvalueString with a timer value
DateTimestartDateTimeDate and time of the start of the countdown
Returns
TypeDescription
TimeSpanTimeSpan with interval

SetWorkingHours(Calendar, TimeSpan)

Set working hours per day

Declaration
public static Calendar SetWorkingHours(this Calendar calendar, TimeSpan workingHours)
Parameters
TypeNameDescription
CalendarcalendarCalendar instance
TimeSpanworkingHoursWorking hours
Returns
TypeDescription
CalendarCalendar instance

SetStartOfWork(Calendar, TimeSpan)

Set the start of the work day

Declaration
public static Calendar SetStartOfWork(this Calendar calendar, TimeSpan startTimeOfDay)
Parameters
TypeNameDescription
CalendarcalendarCalendar instance
TimeSpanstartTimeOfDayThe beginning of the work day
Returns
TypeDescription
CalendarCalendar instance

SetWeekends(Calendar, params DayOfWeek[])

Set the weekends

Declaration
public static Calendar SetWeekends(this Calendar calendar, params DayOfWeek[] weekends)
Parameters
TypeNameDescription
CalendarcalendarCalendar instance
System.DayOfWeek[]weekendsArray of the DayOfWeek
Returns
TypeDescription
CalendarCalendar instance

SetYears(Calendar, params Year[])

Set years

Declaration
public static Calendar SetYears(this Calendar calendar, params Year[] years)
Parameters
TypeNameDescription
CalendarcalendarCalendar instance
OptimaJet.Workflow.Core.Runtime.Calendars.Year[]yearsArray of the <xref href="OptimaJet.Workflow.Core.Runtime.Calendars.Year" data-throw-if-not-resolved="false"></xref>
Returns
TypeDescription
CalendarCalendar instance