Constructor Summary |
---|
DateTime(year, month, day)
Initializes a new instance of the DateTime object to the specified year, month, and day. |
DateTime(year, month, day, hour, minute, second)
Initializes a new instance of the DateTime object to the specified year, month, day, hour, minute, and second. |
DateTime(year, month, day, hour, minute, second, millisecond)
Initializes a new instance of the DateTime object to the specified year, month, day, hour, minute, second, and millisecond. |
DateTime(date)
Initializes a new instance of the DateTime object to the specified Date object |
DateTime(cld)
Initializes a new instance of the DateTime object to the specified Calendar object |
Method Summary | ||
---|---|---|
function | addDays(value) | |
Adds the specified number of days to the value of this instance.
|
||
function | addHours(value) | |
Adds the specified number of hours to the value of this instance.
|
||
function | addMilliseconds(value) | |
Adds the specified number of milliseconds to the value of this instance.
|
||
function | addMinutes(value) | |
Adds the specified number of minutes to the value of this instance.
|
||
function | addMonths(months) | |
Adds the specified number of months to the value of this instance.
|
||
function | addSeconds(value) | |
Adds the specified number of seconds to the value of this instance.
|
||
function | addYears(value) | |
Adds the specified number of years to the value of this instance.
|
||
function | compareTo(value) | |
Compares the value of this instance to 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.
|
||
function | compareTo(value) | |
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.
|
||
function | equals(value) | |
Returns a value indicating whether this instance is equal to a specified object.
|
||
function | getDay() | |
Gets the day of the month represented by this instance.
|
||
function | getDayOfWeek() | |
Gets the day of the week represented by this instance.
|
||
function | getDayOfYear() | |
Gets the day of the year represented by this instance.
|
||
function | getHour() | |
Gets the hour component of the date represented by this instance.
|
||
function | getMillisecond() | |
Gets the milliseconds component of the date represented by this instance.
|
||
function | getMinute() | |
Gets the minute component of the date represented by this instance.
|
||
function | getMonth() | |
Gets the month component of the date represented by this instance.
|
||
static function | getNow() | |
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
|
||
function | getSecond() | |
Gets the seconds component of the date represented by this instance.
|
||
function | getYear() | |
Gets the year component of the date represented by this instance.
|
||
function | hashCode() | |
Returns the hash code for this instance.
|
||
function | toCalendar() | |
Converts the value of the current DateTime object to Calendar object.
|
||
function | toDate() | |
Converts the value of the current DateTime object to Date object.
|
||
function | toLocalTime() | |
Converts the value of the current DateTime object to local time.
|
||
function | toString() | |
Converts the value of the current DateTime object to its equivalent string representation.
|
||
function | toUniversalTime() | |
Converts the value of the current DateTime object to Coordinated Universal Time(UTC).
|
function DateTime(year, month, day)
year: Number
- The year (1 through 9999).month: Number
- The month (1 through 12).day: Number
- The day (1 through the number of days in month).function DateTime(year, month, day, hour, minute, second)
year: Number
- The year (1 through 9999).month: Number
- The month (1 through 12).day: Number
- The day (1 through the number of days in month).hour: Number
- The hours (0 through 23).minute: Number
- The minutes (0 through 59).second: Number
- The seconds (0 through 59).function DateTime(year, month, day, hour, minute, second, millisecond)
year: Number
- The year (1 through 9999).month: Number
- The month (1 through 12).day: Number
- The day (1 through the number of days in month).hour: Number
- The hours (0 through 23).minute: Number
- The minutes (0 through 59).second: Number
- The seconds (0 through 59).millisecond: Number
- The milliseconds (0 through 999).function DateTime(date)
date: Date
- The Date objectfunction DateTime(cld)
cld: Calendar
- The Calendar objectfunction toDate()
function toCalendar()
function toUniversalTime()
function toLocalTime()
function addDays(value)
value: Number
- A number of whole and fractional days. The value parameter can be negative or positive.function addHours(value)
value: Number
- A number of whole and fractional hours. The value parameter can be negative or positive.function addMilliseconds(value)
value: Number
- A number of whole and fractional milliseconds. The value parameter can be negative or positive. Note that this value is rounded to the nearest integer.function addMinutes(value)
value: Number
- A number of whole and fractional minutes. The value parameter can be negative or positive.function addMonths(months)
months: Number
- A number of months. The months parameter can be negative or positive.function addSeconds(value)
value: Number
- A number of whole and fractional seconds. The value parameter can be negative or positive.function addYears(value)
value: Number
- A number of years. The value parameter can be negative or positive.function compareTo(value)
value: Object
- A boxed DateTime object to compare, or null.function compareTo(value)
value: DateTime
- A DateTime object to compare.function hashCode()
function equals(value)
value: Object
- An object to compare to this instance.function getDay()
function getDayOfWeek()
function getDayOfYear()
function getHour()
function getMillisecond()
function getMinute()
function getMonth()
static function getNow()
function getSecond()
function getYear()
function toString()