Platform Support
| IE | Mozilla | Netscape | Opera | Safari | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Date Constructor([Number milliseconds,] [String dateString,] [Object yr_num, mo_num, day_num,] [Object hr_num, min_num, sec_num, ms_num]) : Date
Creates a new instance of a Date object.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
Date([Number milliseconds,] [String dateString,] [Object yr_num, mo_num, day_num,] [Object hr_num, min_num, sec_num, ms_num]) : DateCreates a new instance of a Date object. Parameters
Returns
|
||||||||||||||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|---|
|
constructor
: Function
Specifies the function that creates an object's prototype. Note that the value of this property is a reference to the function
itself, not a string containing the function's name.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
||||||
|
prototype
: Date
Represents the prototype for this class. You can use the prototype to add properties or methods to all instances of a class.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|
||||||
Functions
| Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
getDate() : Number
Returns the day of the month for the specified date
according to local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getDay() : Number
Returns a number representing the day of the week for the specified date (according to local time).
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getFullYear() : Number
Returns the year of the specified date according to
local time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getHours() : Number
Returns the hour for the specified date according to
local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getMilliseconds() : Number
Returns the number of milliseconds in the specified date
according to local time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getMinutes() : Number
Returns the minutes in the specified date according to
local time.
|
Show Details | 4.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getMonth() : Number
Returns the month (from 0-11) in the specified date according to
local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getSeconds() : Number
Returns the seconds in the specified date according to
local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getTime() : Number
Returns the numeric value corresponding to the time
for the specified date according to universal time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getTimezoneOffset() : Number
Returns the time-zone offset in minutes for the
current locale.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCDate() : Number
Returns the day (date) of the month in the specified
date according to universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCDay() : Number
Returns the day of the week in the specified date
according to universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCFullYear() : Number
Returns the year in the specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCHours() : Number
Returns the hours in the specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCMilliseconds() : Number
Returns the milliseconds in the specified date
according to universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCMinutes() : Number
Returns the minutes in the specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCMonth() : Number
Returns the month of the specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getUTCSeconds() : Number
Returns the seconds in the specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
getYear() : Number
Returns the year in the specified date according to
local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
now() : Number
Returns the number of milliseconds passed since 1970-01-01 00:00:00 UTC.
|
Show Details | no | 1.0+ | no | no | no | ||||||||||||||
|
Returns
|
||||||||||||||||||||
|
static parse(String dateString) : Number
Parses a string representation of a date, and returns
the number of milliseconds since January 1, 1970,
00:00:00, local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setDate(Number dayValue) : Number
Sets the day of the month for a specified date
according to local time.
|
Show Details | 4.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setFullYear(Number yearValue, [Number monthValue,] [Number dayValue]) : Number
Sets the full year for a specified date according to
local time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setHours(Number hoursValue, [Number minutesValue,] [Number secondsValue,] [Number msValue]) : Number
Sets the hours for a specified date according to local
time.
|
Show Details | 4.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setMilliseconds(Number millisecondsValue) : Number
Sets the milliseconds for a specified date according
to local time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setMinutes(Number minutesValue, [Number secondsValue,] [Number msValue]) : Number
Sets the minutes for a specified date according to
local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setMonth(Number monthValue, [Number dayValue]) : Number
Set the month for a specified date according to local
time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setSeconds(Number secondsValue, [Number msValue]) : Number
Sets the seconds for a specified date according to
local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setTime(Number timeValue) : Number
Sets the value of a Date object according
to local time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setUTCDate(Number dayValue) : Number
Sets the day of the month for a specified date
according to universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setUTCFullYear(Number yearValue, [Number monthValue,] [Number dayValue]) : Number
Sets the full year for a specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setUTCHours(Number hoursValue, [Number minutesValue,] [Number secondsValue,] [Number msValue]) : Number
Sets the hour for a specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setUTCMilliseconds(Number millisecondsValue) : Number
Sets the milliseconds for a specified date according
to universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setUTCMinutes(Number minutesValue, [Number secondsValue,] [Number msValue]) : Number
Sets the minutes for a specified date according to universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setUTCMonth(Number monthValue, [Number dayValue]) : Number
Sets the month for a specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setUTCSeconds(Number secondsValue, [Number msValue]) : Number
Sets the seconds for a specified date according to
universal time.
|
Show Details | 4.0+ | 1.0+ | 4.06+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
|
||||||||||||||||||||
|
setYear(Number yearValue) : Number
Sets the year for a specified date according to local
time.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | ||||||||||||||
|
Parameters
Returns
| ||||||||||||||||||||
