The Date type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| Date | Overloaded. |
Methods
| Name | Description | |
|---|---|---|
| Add |
Adds the value of the specified TimeSpan to the value of this instance.
| |
| AddDays |
Adds the specified number of days to the value of this instance.
| |
| AddHours |
Adds the specified number of hours to the value of this instance.
| |
| AddMilliseconds |
Adds the specified number of milliseconds to the value of this instance.
| |
| AddMinutes |
Adds the specified number of minutes to the value of this instance.
| |
| AddMonths |
Adds the specified number of months to the value of this instance.
| |
| AddSeconds |
Adds the specified number of seconds to the value of this instance.
| |
| AddTicks |
Adds the specified number of ticks to the value of this instance.
| |
| AddYears |
Adds the specified number of years to the value of this instance.
| |
| Compare |
Compares two instances of Date and returns an indication of their relative values.
| |
| CompareTo | Overloaded. | |
| DaysInMonth |
Returns the number of days in the specified month and year.
| |
| Equals | Overloaded. | |
| Finalize | (Inherited from Object.) | |
| GetHashCode |
Returns the hash code for this instance.
(Overrides ValueType..::.GetHashCode()()().) | |
| GetType | (Inherited from Object.) | |
| IsLeapYear |
Returns an indication whether the specified year is a leap year.
| |
| MemberwiseClone | (Inherited from Object.) | |
| Parse | Overloaded. | |
| ParseExact | Overloaded. | |
| Subtract | Overloaded. | |
| ToDateTime |
Returns a date time value based on the current date value, having no time information.
| |
| ToLongDateString |
Converts the value of the current Date object to its equivalent long date string representation.
| |
| ToShortDateString |
Converts the value of the current Date object to its equivalent short date string representation.
| |
| ToString | Overloaded. | |
| TryParse | Overloaded. | |
| TryParseExact | Overloaded. |
Operators
| Name | Description | |
|---|---|---|
| Addition |
Adds a specified time interval to a specified date, yielding a new date and time.
| |
| Equality |
Determines whether a specified instance of Date is equal to a specified DateTime.
| |
| GreaterThan |
Determines whether one specified Date is greater than a specified DateTime.
| |
| GreaterThanOrEqual |
Determines whether one specified Date is greater than or equal to a specified DateTime.
| |
| Implicit | Overloaded. | |
| Inequality |
Determines whether a specified instance of Date is not equal to a specified DateTime.
| |
| LessThan |
Determines whether one specified Date is less than a specified DateTime.
| |
| LessThanOrEqual |
Determines whether one specified Date is less than or equal to a specified DateTime.
| |
| Subtraction | Overloaded. |
Fields
| Name | Description | |
|---|---|---|
| MaxValue |
Represents the largest possible value of Date. This field is read-only.
| |
| MinValue |
Represents the smallest possible value of Date. This field is read-only.
|
Properties
| Name | Description | |
|---|---|---|
| Day |
Gets the day of the month represented by this instance.
| |
| DayOfWeek |
Gets the day of the week represented by this instance.
| |
| DayOfYear |
Gets the day of the year represented by this instance.
| |
| Month |
Gets the month component of the date represented by this instance.
| |
| Today |
Gets the current date.
| |
| Year |
Gets the year component of the date represented by this instance.
|