Bridge

DateTime Members

The DateTime type exposes the following members.

Constructors


  Name Description
Public method DateTime(Int64)
Initializes a new instance of the DateTime structure to a specified number of ticks.
Public method DateTime(String)
String value representing a date. The string should be in a format recognized by the Date.parse() method (IETF-compliant RFC 2822 timestamps and also a version of ISO8601).
Public method DateTime(Int32, Int32)
Public method DateTime(Int32, Int32, Int32)
Initializes a new instance of the DateTime structure to the specified year, month, and day.
Public method DateTime(Int32, Int32, Int32, Int32)
Public method DateTime(Int32, Int32, Int32, Int32, Int32)
Public method DateTime(Int32, Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the DateTime structure to the specified year, month, day, hour, minute, and second.
Public method DateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the DateTime structure to the specified year, month, day, hour, minute, second, and millisecond.

Methods


  Name Description
Public method Add
Public method AddDays
Returns a new DateTime that adds the specified number of days to the value of this instance.
Public method AddHours
Returns a new DateTime that adds the specified number of hours to the value of this instance.
Public method AddMilliseconds
Returns a new DateTime that adds the specified number of milliseconds to the value of this instance.
Public method AddMinutes
Returns a new DateTime that adds the specified number of minutes to the value of this instance.
Public method AddMonths
Returns a new DateTime that adds the specified number of months to the value of this instance.
Public method AddSeconds
Returns a new DateTime that adds the specified number of seconds to the value of this instance.
Public method AddTicks
Returns a new DateTime that adds the specified number of ticks to the value of this instance.
Public method AddYears
Returns a new DateTime that adds the specified number of years to the value of this instance.
Public method Static member Compare
Public method CompareTo(DateTime)
Public method CompareTo(Object)
Compares the value of this instance to a specified object that contains a specified DateTime value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified DateTime value.
Public method Static member DaysInMonth
Returns the number of days in the specified month and year.
Public method Equals(DateTime)
Public method Static member Equals(DateTime, DateTime)
Public method Format(String)
Public method Format(String, IFormatProvider)
Public method GetDate
Public method GetDay
Public method GetFullYear
Public method GetHours
Public method GetMilliseconds
Public method GetMinutes
Public method GetMonth
Public method GetSeconds
Public method GetTime
Public method GetTimezoneOffset
Public method GetUtcDate
Public method GetUtcDay
Public method GetUtcFullYear
Public method GetUtcHours
Public method GetUtcMilliseconds
Public method GetUtcMinutes
Public method GetUtcMonth
Public method GetUtcSeconds
Public method IsDaylightSavingTime
Indicates whether this instance of DateTime is within the daylight saving time range for the current time zone.
Public method Static member IsLeapYear
Returns an indication whether the specified year is a leap year.
Public method Static member Parse(String)
Converts the string representation of a date and time to its DateTime equivalent.
Public method Static member Parse(String, IFormatProvider)
Public method Static member Parse(String, IFormatProvider, Boolean)
Public method Static member Parse(String, Boolean)
Public method Static member ParseExact(String, String)
Public method Static member ParseExact(String, String, Boolean)
Public method Static member ParseExact(String, array<String>[]()[][])
Public method Static member ParseExact(String, array<String>[]()[][], Boolean)
Public method Static member ParseExact(String, String, IFormatProvider)
Public method Static member ParseExact(String, String, IFormatProvider, Boolean)
Public method Static member ParseExact(String, array<String>[]()[][], IFormatProvider)
Public method Static member ParseExact(String, array<String>[]()[][], IFormatProvider, Boolean)
Public method Subtract(DateTime)
Public method Subtract(TimeSpan)
Public method ToDateString
Public method ToISOString
Public method ToLocaleDateString
Public method ToLocalTime
Converts the value of the current DateTime object to local time.
Public method ToString()()()()
Converts the value of the current DateTime object to its equivalent string representation.
Public method ToString(String)
Converts the value of the current DateTime object to its equivalent string representation using the specified format.
Public method ToString(String, IFormatProvider)
Public method ToTimeString
Public method ToUniversalTime
Converts the value of the current DateTime object to Coordinated Universal Time (UTC).
Public method ToUtcString
Public method Static member TryParse(String, DateTime%)
Public method Static member TryParse(String, DateTime%, Boolean)
Public method Static member TryParse(String, IFormatProvider, DateTime%)
Public method Static member TryParse(String, IFormatProvider, DateTime%, Boolean)
Public method Static member TryParseExact(String, String, DateTime%)
Public method Static member TryParseExact(String, String, DateTime%, Boolean)
Public method Static member TryParseExact(String, array<String>[]()[][], DateTime%)
Public method Static member TryParseExact(String, array<String>[]()[][], DateTime%, Boolean)
Public method Static member TryParseExact(String, String, IFormatProvider, DateTime%)
Public method Static member TryParseExact(String, String, IFormatProvider, DateTime%, Boolean)
Public method Static member TryParseExact(String, array<String>[]()[][], IFormatProvider, DateTime%)
Public method Static member TryParseExact(String, array<String>[]()[][], IFormatProvider, DateTime%, Boolean)
Public method Static member Utc(Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Public method Static member Utc(Int32, Int32, Int32, Int32, Int32, Int32)
Public method Static member Utc(Int32, Int32, Int32, Int32, Int32)
Public method Static member Utc(Int32, Int32, Int32, Int32)
Public method Static member Utc(Int32, Int32, Int32)
Public method Static member Utc(Int32, Int32)

Fields


  Name Description
Public field Static member MaxValue
Represents the largest possible value of DateTime. This field is read-only.
Public field Static member MinValue
Represents the smallest possible value of DateTime. This field is read-only.

Properties


  Name Description
Public property Date
Gets the date component of this instance.
Public property Day
Gets the day of the month represented by this instance.
Public property DayOfWeek
Gets the day of the week represented by this instance.
Public property DayOfYear
Gets the day of the year represented by this instance.
Public property Hour
Gets the hour component of the date represented by this instance.
Public property Millisecond
Gets the milliseconds component of the date represented by this instance.
Public property Minute
Gets the minute component of the date represented by this instance.
Public property Month
Gets the month component of the date represented by this instance.
Public property Static member Now
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
Public property Second
Gets the seconds component of the date represented by this instance.
Public property Ticks
Gets the number of ticks that represent the date and time of this instance.
Public property TimeOfDay
Gets the time of day for this instance.
Public property Static member Today
Gets the current date.
Public property Static member UtcNow
Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
Public property Year
Gets the year component of the date represented by this instance.