Assembly: OptimaJet.Workflow.Core

Class Workday

OptimaJet.Workflow.Core.Runtime.Calendars.Workday

Represents the workday settings for a specific calendar date.

public class Workday

Properties

public MonthDay Date { get; set; } #
Gets or sets the calendar day to which this workday applies.
public TimeSpan StartTimeOfDay { get; set; } #
Gets or sets the time of day when the workday starts.
public TimeSpan WorkingHours { get; set; } #
Gets or sets the duration of working time for this day.

Methods

public static Workday Create(MonthDay date, TimeSpan startTimeOfDay, TimeSpan workingHours) #
Creates a new Workday for the specified day and period.

Parameters

Name
Type
Description
date
MonthDay
The calendar day the settings apply to.
startTimeOfDay
TimeSpan
The workday start time. Fractional seconds are removed by HelperDateTime.Floor(TimeSpan) before validation.
workingHours
TimeSpan
The working-day duration, in hours and minutes. Fractional seconds are removed by HelperDateTime.Floor(TimeSpan) before validation.

Returns

Type
Description
Workday
A configured Workday instance.

Exceptions

Type
Description
ArgumentException
startTimeOfDay is negative.
ArgumentOutOfRangeException
startTimeOfDay is greater than 24 hours, workingHours is greater than 24 hours, or their combination exceeds a calendar day.
public override bool Equals(object obj) #
Determines whether the specified object is equal to the current Workday.

Parameters

Name
Type
Description
obj
Object
The object to compare with this instance.

Returns

Type
Description
Boolean
true if the specified object is a Workday with the same day, start time, and working duration; otherwise, false.
public override int GetHashCode() #
Returns a hash code for the current Workday.

Returns

Type
Description