Mono Class Library: Overview

System.DateTime: Members

The members of System.DateTime are listed below.

See Also: Inherited members from System.ValueType

Public Constructors

Constructs and initializes a new instance of the DateTime structure with the date and time expressed in 100-nanosecond units.
Documentation for this section has not yet been entered.
Constructs and initializes a new instance of the DateTime structure with a specified year, month, and day.
Documentation for this section has not yet been entered.
Constructs and initializes a new instance of the DateTime structure with a specified year, month, day, hour, minute, and second.
Documentation for this section has not yet been entered.
Documentation for this section has not yet been entered.
Constructs and initializes a new instance of the DateTime structure with a specified year, month, day, hour, minute, second, and millisecond.
Documentation for this section has not yet been entered.
Documentation for this section has not yet been entered.
Documentation for this section has not yet been entered.

Public Fields

static readonly
MaxValueDateTime (12/31/9999 11:59:59 PM). A constant representing the largest possible value of DateTime.
static readonly
MinValueDateTime (1/1/0001 12:00:00 AM). A constant representing the smallest possible value of DateTime.

Public Properties

[read-only]
DateDateTime. Gets the date component of the current instance.
[read-only]
Dayint. Gets the day of the month represented by the current instance.
[read-only]
DayOfWeekDayOfWeek. Gets the day of the week represented by the current instance.
[read-only]
DayOfYearint. Gets the day of the year represented by the current instance.
[read-only]
Hourint. Gets the hour represented by the current instance.
[read-only]
KindDateTimeKind. Documentation for this section has not yet been entered.
[read-only]
Millisecondint. Gets the milliseconds component of the date represented by the current instance.
[read-only]
Minuteint. Gets the minute component of the date represented by the current instance.
[read-only]
Monthint. Gets the month component of the date represented by the current instance.
[read-only]
static
NowDateTime. Gets a DateTime representing the current local date and time.
[read-only]
Secondint. Gets the seconds component of the date represented by the current instance.
[read-only]
Tickslong. Gets the number of 100-nanosecond ticks that represent the date and time of the current instance.
[read-only]
TimeOfDayTimeSpan. Gets the time of day of the current instance.
[read-only]
static
TodayDateTime. Gets the current date.
[read-only]
static
UtcNowDateTime. Gets the current time converted to coordinated universal time (UTC).
[read-only]
Yearint. Gets the year component of the date represented by the current instance.

Public Methods

Add(TimeSpan) : DateTime
Adds the value of a specified TimeSpan instance to the current instance.
AddDays(double) : DateTime
Adds a specified number of days to the value of the current instance.
AddHours(double) : DateTime
Adds a specified number of hours to the value of the current instance.
AddMilliseconds(double) : DateTime
Adds a specified number of milliseconds to the value of the current instance.
AddMinutes(double) : DateTime
Adds a specified number of minutes to the value of the current instance.
AddMonths(int) : DateTime
Adds a specified number of months to the value of the current instance.
AddSeconds(double) : DateTime
Adds a specified number of seconds to the value of the current instance.
AddTicks(long) : DateTime
Adds a specified number of ticks to the value of the current instance.
AddYears(int) : DateTime
Adds a specified number of years to the value of the current instance.
static
Compare(DateTime, DateTime) : int
Returns the sort order of the two specified instances of DateTime .
CompareTo(DateTime) : int
Returns the sort order of the current instance compared to the specified DateTime .
CompareTo(object) : int
Returns the sort order of the current instance compared to the specified object .
static
DaysInMonth(int, int) : int
Returns the number of days in a specified month of a specified year.
Equals(DateTime) : bool
Returns a bool indicating whether the current instance is equal to the specified DateTime.
override
Equals(object) : bool
Returns a bool indicating whether the current instance is equal to a specified object.
static
Equals(DateTime, DateTime) : bool
Returns a bool indicating whether two specified instances of DateTime are equal.
static
FromBinary(long) : DateTime
Documentation for this section has not yet been entered.
static
FromFileTime(long) : DateTime
Documentation for this section has not yet been entered.
static
FromFileTimeUtc(long) : DateTime
Documentation for this section has not yet been entered.
static
FromOADate(double) : DateTime
Documentation for this section has not yet been entered.
GetDateTimeFormats() : string[]
Documentation for this section has not yet been entered.
GetDateTimeFormats(char) : string[]
Documentation for this section has not yet been entered.
GetDateTimeFormats(IFormatProvider) : string[]
Documentation for this section has not yet been entered.
GetDateTimeFormats(char, IFormatProvider) : string[]
Documentation for this section has not yet been entered.
override
GetHashCode() : int
Generates a hash code for the current instance.
GetTypeCode() : TypeCode
Documentation for this section has not yet been entered.
IsDaylightSavingTime() : bool
Documentation for this section has not yet been entered.
static
IsLeapYear(int) : bool
Returns a bool value indicating whether a specified year is a leap year.
static
Parse(string) : DateTime
Returns the specified string converted to a DateTime value.
static
Parse(string, IFormatProvider) : DateTime
Returns the specified string converted to a DateTime value.
static
Parse(string, IFormatProvider, System.Globalization.DateTimeStyles) : DateTime
Returns the specified string converted to a DateTime value.
static
ParseExact(string, string, IFormatProvider) : DateTime
Converts the specified string representation of a date and time to its DateTime equivalent using a specified format and IFormatProvider .
static
ParseExact(string, string, IFormatProvider, System.Globalization.DateTimeStyles) : DateTime
Converts the string representation of a date and time to its DateTime equivalent using a specified style, the expected format, and culture-specific format information.
static
ParseExact(string, string[], IFormatProvider, System.Globalization.DateTimeStyles) : DateTime
Converts the string representation of a date and time to its DateTime equivalent using a specified style, an array of expected formats, and culture-specific format information.
static
SpecifyKind(DateTime, DateTimeKind) : DateTime
Documentation for this section has not yet been entered.
Subtract(DateTime) : TimeSpan
Subtracts a specified date and time from the current instance.
Subtract(TimeSpan) : DateTime
Subtracts a specified TimeSpan from the current instance.
ToBinary() : long
Documentation for this section has not yet been entered.
ToFileTime() : long
Documentation for this section has not yet been entered.
ToFileTimeUtc() : long
Documentation for this section has not yet been entered.
ToLocalTime() : DateTime
Converts the universal time coordinate (UTC) time value in the current instance to local time.
ToLongDateString() : string
Converts the date denoted by the current instance to its equivalent long date string representation.
ToLongTimeString() : string
Converts the time denoted by the current instance to its equivalent long time string representation.
ToOADate() : double
Documentation for this section has not yet been entered.
ToShortDateString() : string
Converts the date denoted by the current instance to its equivalent short date string representation.
ToShortTimeString() : string
Converts the time denoted by this instance to its equivalent short time string representation.
override
ToString() : string
Returns a string representation of the value of the current instance.
ToString(IFormatProvider) : string
Returns a string representation of the value of the current instance.
ToString(string) : string
Returns a string representation of the value of the current instance.
ToString(string, IFormatProvider) : string
Returns a string representation of the value of the current instance.
ToUniversalTime() : DateTime
Converts the current DateTime value to coordinated universal time (UTC).
static
TryParse(string, out DateTime) : bool
Documentation for this section has not yet been entered.
static
TryParse(string, IFormatProvider, System.Globalization.DateTimeStyles, out DateTime) : bool
Documentation for this section has not yet been entered.
static
TryParseExact(string, string, IFormatProvider, System.Globalization.DateTimeStyles, out DateTime) : bool
Documentation for this section has not yet been entered.
static
TryParseExact(string, string[], IFormatProvider, System.Globalization.DateTimeStyles, out DateTime) : bool
Documentation for this section has not yet been entered.

Public Operators

static
Addition(DateTime, TimeSpan) Adds a specified TimeSpan value to a specified DateTime value.
static
Equality(DateTime, DateTime) Returns a bool value indicating whether the two specified instances of DateTime are equal.
static
GreaterThan(DateTime, DateTime) Returns a bool value indicating whether one specified DateTime is greater than another specified DateTime.
static
GreaterThanOrEqual(DateTime, DateTime) Returns a bool value indicating whether one specified DateTime is greater than or equal to another specified DateTime.
static
Inequality(DateTime, DateTime) Returns a bool value indicating whether two specified instances of DateTime are not equal.
static
LessThan(DateTime, DateTime) Returns a bool value indicating whether one specified DateTime is less than another specified DateTime.
static
LessThanOrEqual(DateTime, DateTime) Returns a bool value indicating whether one specified DateTime is less than or equal to another specified DateTime.
static
Subtraction(DateTime, DateTime) Subtracts a specified DateTime from another specified DateTime value, producing a time interval.
static
Subtraction(DateTime, TimeSpan) Subtracts a specified TimeSpan from a specified DateTime .

Explicitly Implemented Interface Members

IConvertible.ToBooleanDocumentation for this section has not yet been entered.
IConvertible.ToByteDocumentation for this section has not yet been entered.
IConvertible.ToCharDocumentation for this section has not yet been entered.
IConvertible.ToDateTimeDocumentation for this section has not yet been entered.
IConvertible.ToDecimalDocumentation for this section has not yet been entered.
IConvertible.ToDoubleDocumentation for this section has not yet been entered.
IConvertible.ToInt16Documentation for this section has not yet been entered.
IConvertible.ToInt32Documentation for this section has not yet been entered.
IConvertible.ToInt64Documentation for this section has not yet been entered.
IConvertible.ToSByteDocumentation for this section has not yet been entered.
IConvertible.ToSingleDocumentation for this section has not yet been entered.
IConvertible.ToTypeDocumentation for this section has not yet been entered.
IConvertible.ToUInt16Documentation for this section has not yet been entered.
IConvertible.ToUInt32Documentation for this section has not yet been entered.
IConvertible.ToUInt64Documentation for this section has not yet been entered.