A JavaScript Date object wrapper that extends the functionality of the JavaScript Date object. It has all the capabilities of the Date class, plus it adds several helper methods to manipulate its date and time components.
All date and time objects in the calendar are represented by this class.
The following tables list the members exposed by the DateTime type.
Name | Description | |
---|---|---|
![]() |
Initializes a new instance of the DateTime class. |
Name | Description | |
---|---|---|
![]() |
Gets the day component of this DateTime instance. |
|
![]() |
Gets the day of the week component of this DateTime instance. |
|
![]() |
Gets the year component of this DateTime instance. |
|
![]() |
Gets the hours component of this DateTime instance. |
|
![]() |
Gets the milliseconds component of this DateTime instance. |
|
![]() |
Gets the minutes component of this DateTime instance. |
|
![]() |
Gets the month component of this DateTime instance. |
|
![]() |
Gets the seconds component of this DateTime instance. |
|
![]() |
Gets the number of milliseconds between Jan 1 1970 00:00:00 and this DateTime instance. |
|
![]() |
Gets the difference between GMT and local time in minutes. |
|
![]() |
Gets the day component of this DateTime instance, according to universal time. |
|
![]() |
Gets the day of the week component of this DateTime instance, according to universal time. |
|
![]() |
Gets the year component of this DateTime instance, according to universal time. |
|
![]() |
Gets the hours component of this DateTime instance, according to universal time. |
|
![]() |
Gets the milliseconds component of this DateTime instance, according to universal time. |
|
![]() |
Gets the minutes component of this DateTime instance, according to universal time. |
|
![]() |
Gets the month component of this DateTime instance, according to universal time. |
|
![]() |
Gets the seconds component of this DateTime instance, according to universal time. |
|
![]() |
Sets the day component of this DateTime instance. |
|
![]() |
Sets the year component of this DateTime instance. |
|
![]() |
Sets the hours component of this DateTime instance. |
|
![]() |
Sets the milliseconds component of this DateTime instance. |
|
![]() |
Sets the minutes component of this DateTime instance. |
|
![]() |
Sets the seconds component of this DateTime instance. |
|
![]() |
Sets a date and time by adding or subtracting a specified number of milliseconds to/from midnight 1 Jan 1970. |
|
![]() |
Sets the day component of this DateTime instance, according to universal time. |
|
![]() |
Sets the year component of this DateTime instance, according to universal time. |
|
![]() |
Sets the hours component of this DateTime instance, according to universal time. |
|
![]() |
Sets the milliseconds component of this DateTime instance, according to universal time. |
|
![]() |
Sets the minutes component of this DateTime instance, according to universal time. |
|
![]() |
Sets the seconds component of this DateTime instance, according to universal time. |
|
![]() |
Converts the date component of this DateTime instance to a readable string. |
|
![]() |
Converts the date component of this DateTime instance to a readable string, using locale conventions. |
|
![]() |
Converts this DateTime instance to a readable string, using locale conventions. |
|
![]() |
Converts the time component of this DateTime instance to a readable string, using locale conventions. |
|
![]() |
Converts this DateTime instance to a readable string. |
|
![]() |
Converts the time component of this DateTime instance to a readable string. |
|
![]() |
Converts this DateTime instance to a readable string, according to universal time. |
|
![]() |
Adds the specified number of days to the current DateTime object. |
|
![]() |
Adds the specified number of hours to the current DateTime object. |
|
![]() |
Adds the specified number of milliseconds to the current DateTime object. |
|
![]() |
Adds the specified number of minutes to the current DateTime object. |
|
![]() |
Adds the specified number of months to the current DateTime object. |
|
![]() |
Adds the specified number of seconds to the current DateTime object. |
|
![]() |
Returns a copy of the current DateTime object. |
|
![]() ![]() |
Combines the date component of a DateTime object and the time component of another DateTime object into a new DateTime object. |
|
![]() |
Compares the current DateTime instance with another DateTime object and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. |
|
![]() |
Checks if the values of two DateTime objects are equal. |
|
![]() ![]() |
Creates a new DateTime object, by specifying its different date and time components. |
|
![]() ![]() |
Creates a new DateTime object from a provided date string. |
|
![]() ![]() |
Creates a new DateTime object from the number of milliseconds since Jan 1st 1970. |
|
![]() |
Returns the JavaScript Date object, corresponding to the current DateTime object. |
|
![]() ![]() |
Returns the latter of two DateTime objects. |
|
![]() ![]() |
Returns the highest possible DateTime value. |
|
![]() ![]() |
Returns the former of two DateTime objects. |
|
![]() ![]() |
Returns the lowest possible DateTime value. |
|
![]() ![]() |
Returns a DateTime object representing the current DateTime. |
|
![]() ![]() |
Returns a DateTime object representing the current Date. |
|
![]() |
Returns a string representation of the current DateTime object. |