Click or drag to resize

YearMonthDay Structure

Represents a calendar year, month, and day.

Namespace:  AGI.Foundation.Time
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public struct YearMonthDay : IComparable<YearMonthDay>, 
	IComparable, IEquatable<YearMonthDay>

The YearMonthDay type exposes the following members.

Constructors
  NameDescription
Public methodYearMonthDay(Int32)
Initializes a YearMonthDay in the Gregorian calendar from the provided astronomical Julian day number, assuming the beginning of the Julian day (noon).
Public methodYearMonthDay(JulianDate)
Initializes a new instance from a JulianDate.
Public methodYearMonthDay(Int32, Int32)
Initializes a YearMonthDay from the provided values.
Public methodYearMonthDay(Int32, Int32, Int32)
Initializes a YearMonthDay from the provided values.
Top
Properties
  NameDescription
Public propertyDay
Gets the day of the month (in the range 1 through the number of days in the month).
Public propertyDayOfWeek
Gets the day of the week represented by this instance.
Public propertyDayOfYear
Gets the day of the year (in the range 1 through the number of days in the year).
Public propertyJulianDayNumber
Gets the Julian day number for this YearMonthDay instance, assuming noon on this day.
Public propertyMonth
Gets the month of the year (in the range 1 through 12).
Public propertyYear
Gets the year.
Top
Methods
  NameDescription
Public methodCompareTo(Object)
Compares this instance with another instance of the same type.
Public methodCompareTo(YearMonthDay)
Compares this instance with another instance of the same type.
Public methodStatic memberDaysInMonth
Provides the number of days in the month of the indicated year.
Public methodStatic memberDaysInYear
Provides the number of days in the indicated year.
Public methodEquals(Object)
Indicates whether another object is exactly equal to this instance.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(YearMonthDay)
Indicates whether another instance of this type is exactly equal to this instance.
Public methodGetHashCode
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsLeapYear
Indicates whether the year in question is a leap year.
Public methodStatic memberIsValidDate
Indicates whether the year, month, and day are a valid representation.
Public methodToString
Returns a string formatted as Year:Month:Day
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Returns if the two instances are exactly equal.
Public operatorStatic memberGreaterThan
Returns if left is greater than right.
Public operatorStatic memberGreaterThanOrEqual
Returns if left is greater than or equal to right.
Public operatorStatic memberInequality
Returns if the two instances are not exactly equal.
Public operatorStatic memberLessThan
Returns if left is less than right.
Public operatorStatic memberLessThanOrEqual
Returns if left is less than or equal to right.
Top
See Also