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
Syntaxpublic static class CalendarExtensions
Methods
GetInterval(ICalendar, string, DateTime)
Calculate the time interval
Declarationpublic static TimeSpan GetInterval(this ICalendar calendar, string value, DateTime startDateTime)
Type | Name | Description |
---|---|---|
ICalendar | calendar | Calendar instance |
string | value | String with a timer value |
DateTime | startDateTime | Date and time of the start of the countdown |
Type | Description |
---|---|
TimeSpan | TimeSpan with interval |
SetWorkingHours(Calendar, TimeSpan)
Set working hours per day
Declarationpublic static Calendar SetWorkingHours(this Calendar calendar, TimeSpan workingHours)
Type | Name | Description |
---|---|---|
Calendar | calendar | Calendar instance |
TimeSpan | workingHours | Working hours |
Type | Description |
---|---|
Calendar | Calendar instance |
SetStartOfWork(Calendar, TimeSpan)
Set the start of the work day
Declarationpublic static Calendar SetStartOfWork(this Calendar calendar, TimeSpan startTimeOfDay)
Type | Name | Description |
---|---|---|
Calendar | calendar | Calendar instance |
TimeSpan | startTimeOfDay | The beginning of the work day |
Type | Description |
---|---|
Calendar | Calendar instance |
SetWeekends(Calendar, params DayOfWeek[])
Set the weekends
Declarationpublic static Calendar SetWeekends(this Calendar calendar, params DayOfWeek[] weekends)
Type | Name | Description |
---|---|---|
Calendar | calendar | Calendar instance |
System.DayOfWeek[] | weekends | Array of the DayOfWeek |
Type | Description |
---|---|
Calendar | Calendar instance |
SetYears(Calendar, params Year[])
Set years
Declarationpublic static Calendar SetYears(this Calendar calendar, params Year[] years)
Type | Name | Description |
---|---|---|
Calendar | calendar | Calendar instance |
OptimaJet.Workflow.Core.Runtime.Calendars.Year[] | years | Array of the <xref href="OptimaJet.Workflow.Core.Runtime.Calendars.Year" data-throw-if-not-resolved="false"></xref> |
Type | Description |
---|---|
Calendar | Calendar instance |