# Class Workday OptimaJet.Workflow.Core.Runtime.Calendars.Workday Represents the workday settings for a specific calendar date. Namespace: [OptimaJet.Workflow.Core.Runtime.Calendars](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/) ```csharp 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](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/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)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Helpers/HelperDateTime/) before validation. | | `workingHours` | `TimeSpan` | The working-day duration, in hours and minutes. Fractional seconds are removed by [HelperDateTime.Floor(TimeSpan)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Helpers/HelperDateTime/) before validation. | ### Returns | Type | Description | | --- | --- | | `Workday` | A configured [Workday](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/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](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/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](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Workday/) with the same day, start time, and working duration; otherwise, `false`. | `public override int GetHashCode()` Returns a hash code for the current [Workday](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Workday/). ### Returns | Type | Description | | --- | --- | | `Int32` | A hash code based on [Workday.Date](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Workday/), [Workday.StartTimeOfDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Workday/), and [Workday.WorkingHours](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Workday/). | [Previous Months](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Months/) [Next Year](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Year/)