Assembly: OptimaJet.Workflow.Core

Class MonthDay

OptimaJet.Workflow.Core.Runtime.Calendars.MonthDay

Represents a day of a month.

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 from a DateTime.

Parameters

Name
Type
Description
date
DateTime
A DateTime value to convert.

Returns

Type
Description
MonthDay
A 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 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.
day
Int32
The day number.

Returns

Type
Description
MonthDay
A 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.

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 and has the same values; otherwise, false.
public override int GetHashCode() #
Returns a hash code for the current MonthDay.

Returns

Type
Description
Int32
A hash code based on MonthDay.Month and MonthDay.DayNumber.