Click or drag to resize

Date Methods

The Date type exposes the following members.

Methods
 NameDescription
Public methodAddMonths(Int32)Adds a number of months to this date.
Public methodStatic memberAddMonths(Int32, Int32, Int32, Int32)Adds a number of months to a given date.
Public methodAddYearsAdds a number of years to this date.
Public methodCompareToCompares the current date with another.
Public methodStatic memberDaysInMonthReturns the number of days in the month given by a year and month.
Public methodDeconstruct(Int32, Int32)Extracts the year and month in a single call.
Public methodDeconstruct(Int32, Int32, Int32)Extracts all components from a date in a single call.
Public methodEquals(Date)Compares this date to another date.
Public methodEquals(Object)Compares this date to another object for equality.
(Overrides ValueTypeEquals(Object))
Public methodStatic memberFromYearCreates a Date instance for Jan 1st of the given year.
Public methodGetHashCodeReturns a hash code for this date.
(Overrides ValueTypeGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsLeapChecks if the date belongs to a leap year.
Public methodStatic memberIsLeapYearChecks if a given year is a leap year.
Public methodStatic memberMaxGets the maximum of two dates.
Public methodStatic memberMinGets the minimum of two dates.
Public methodStatic memberParse(ReadOnlySpanChar, IFormatProvider)Parses a span of characters into a value.
Public methodStatic memberParse(String, IFormatProvider)Parses a string into a value.
Public methodRollEOMRolls this date up to the end of month.
Public methodRollIMMRolls this date up to the third Wednesday of the month.
Public methodToStringGets a textual representation of this date.
(Overrides ValueTypeToString)
Public methodToString(String, IFormatProvider)Gets a textual representation of this date.
Public methodTruncateDayChange the day of a date to the first day in the month.
Public methodStatic memberTryParse(ReadOnlySpanChar, IFormatProvider, Date)Tries to parse a span of characters into a value.
Public methodStatic memberTryParse(String, IFormatProvider, Date)Tries to parse a string into a value.
Top
See Also