# Class MonthDay OptimaJet.Workflow.Core.Runtime.Calendars.MonthDay Represents a day of a month. Namespace: [OptimaJet.Workflow.Core.Runtime.Calendars](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/) ```csharp public class MonthDay ``` ## Properties `public Months Month { get; set; }` Gets or sets the month for this day. `public int DayNumber { get; set; }` Gets or sets the day number inside the month. ## Methods `public static MonthDay Create(DateTime date)` Creates a [MonthDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/) from a [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime). ### Parameters | Name | Type | Description | | --- | --- | --- | | `date` | `DateTime` | A [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) value to convert. | ### Returns | Type | Description | | --- | --- | | `MonthDay` | A [MonthDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/) instance containing the month and day from the provided value. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentException` | If `date` does not contain a valid day for its month. | `public static MonthDay Create(int year, Months month, int day)` Creates a [MonthDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/) from separate date components. ### Parameters | Name | Type | Description | | --- | --- | --- | | `year` | `Int32` | The year component used to validate the day against the month calendar. | | `month` | `Months` | The month component represented as [Months](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Months/). | | `day` | `Int32` | The day number. | ### Returns | Type | Description | | --- | --- | | `MonthDay` | A [MonthDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/) instance that contains the provided month and day. | ### Exceptions | Type | Description | | --- | --- | | `ArgumentOutOfRangeException` | `year`, `month`, or `day` is outside a valid date range. | `public override bool Equals(object obj)` Determines whether the specified object is equal to this [MonthDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/). ### Parameters | Name | Type | Description | | --- | --- | --- | | `obj` | `Object` | The object to compare with this instance. | ### Returns | Type | Description | | --- | --- | | `Boolean` | `true` if the specified object is a [MonthDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/) and has the same values; otherwise, `false`. | `public override int GetHashCode()` Returns a hash code for the current [MonthDay](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/). ### Returns | Type | Description | | --- | --- | | `Int32` | A hash code based on [MonthDay.Month](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/) and [MonthDay.DayNumber](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/MonthDay/). | [Previous ICalendar](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/ICalendar/) [Next Months](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.Calendars/Months/)