Class Year
OptimaJet.Workflow.Core.Runtime.Calendars.Year
Work year settings
Namespace: OptimaJet.Workflow.Core.Runtime.Calendars
public class YearInheritance
- System.Object
Properties
Name
Type
YearNumber #Int32Year number, for example 2023
Holidays #List<MonthDay>Holidays
Workdays #List<Workday>Setting up individual days
Methods
public bool IsWorkday(DateTime day, bool weekend) #Checking whether the day is a workday
Parameters
Name
Type
Description
dayDateTimeDay instance
weekendBooleanFlag whether the day is a weekend according to the calendar
Returns
Type
Description
Booleantrue if day is workday, false otherwise
public TimeSpan? GetDayTime(DateTime day) #Get all working hours on the day
Parameters
Name
Type
Description
dayDateTimeDay instance
Returns
Type
Description
Nullable<TimeSpan>working hours or null if the year has no data
public static Year Create(int year) #Create instance of the year
Parameters
Name
Type
Description
yearInt32Number of the year
Returns
Type
Description
YearYear instance
public Year SetHolidays(params MonthDay[] holidays) #Set holidays in this year
Parameters
Name
Type
Description
holidaysMonthDay[]Array of the holidays
Returns
Type
Description
YearYear instance
public Year SetHoliday(Months month, int day) #Set holiday in this year
Parameters
Name
Type
Description
monthMonthsMonth
dayInt32Day number
Returns
Type
Description
YearYear instance
public Year SetWorkdays(params Workday[] workdays) #Set workdays
Parameters
Name
Type
Description
workdaysWorkday[]Array of the Workday
Returns
Type
Description
YearYear instance
public Year SetWorkday(Months month, int day, TimeSpan startTimeOfDay, TimeSpan workingHours) #Set workday
Parameters
Name
Type
Description
monthMonthsMonth
dayInt32Day number
startTimeOfDayTimeSpanThe beginning of the working day
workingHoursTimeSpanWorking hours
Returns
Type
Description
YearYear instance
public override bool Equals(object obj) #Parameters
Name
Type
Description
objObjectReturns
Type
Description
Booleanpublic override int GetHashCode() #Returns
Type
Description
Int32