The native browser JavaScript object used to work with dates and times.
When constructed, a new Date will be populated with the current date and time.
Note that this object is implemented and supported by the web browser and results of its use may vary.
Method Summary |
public Number |
getDate()
Gets the day of the month (e.g.
|
public Number |
getDay()
Gets the day of the week (e.g.
|
public Number |
getFullYear()
Gets the 4-digit number representing the year.
|
public Number |
getHours()
Gets the hour of the day (e.g.
|
public Number |
getMilliseconds()
Gets the milliseconds division of the day (e.g.
|
public Number |
getMinutes()
Gets the minutes division of the day (e.g.
|
public Number |
getMonth()
Gets the month of the year (e.g.
|
public Number |
getSeconds()
Gets the seconds division of the day (e.g.
|
public Number |
getTime()
Gets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT).
|
public Number |
getTimezoneOffset()
Gets the number of minutes between the associated time zone and Greenwich Mean Time (GMT).
|
public Number |
getUTCDate()
Gets the day of the month (e.g.
|
public Number |
getUTCDay()
Gets the day of the week (e.g.
|
public Number |
getUTCFullYear()
Gets the 4-digit number representing the year according to Coordinated Universal Time (UTC).
|
public Number |
getUTCHours()
Gets the hour of the day (e.g.
|
public Number |
getUTCMilliseconds()
Gets the milliseconds division of the day (e.g.
|
public Number |
getUTCMinutes()
Gets the minutes division of the day (e.g.
|
public Number |
getUTCMonth()
Gets the month of the year (e.g.
|
public Number |
getUTCSeconds()
Gets the seconds division of the day (e.g.
|
public Number |
getYear()
|
public static Number |
parse(String dateString)
Gets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT) represented by dateString .
|
public Object |
setDate(Number dayOfTheMonth)
Sets the day of the month (e.g.
|
public Object |
setFullYear(Number year)
Sets the 4-digit number representing the year.
|
public Object |
setHours(Number hours)
Sets the hour of the day (e.g.
|
public Object |
setMilliseconds(Number milliseconds)
Sets the milliseconds division of the day (e.g.
|
public Object |
setMinutes(Number minutes)
Sets the minutes division of the day (e.g.
|
public Object |
setMonth(Number month)
Sets the month of the year (e.g.
|
public Object |
setSeconds(Number seconds)
Sets the seconds division of the day (e.g.
|
public Object |
setTime(Number milliseconds)
Sets the number of milliseconds since midnight of January 1st, 1970 Greenwich Mean Time (GMT).
|
public Object |
setUTCDate(Number dayOfTheMonth)
Sets the day of the month (e.g.
|
public Object |
setUTCFullYear(Number year)
Sets the 4-digit number representing the year according to Coordinated Universal Time (UTC).
|
public Object |
setUTCHours(Number hours)
Sets the hour of the day (e.g.
|
public Object |
setUTCMilliseconds(Number milliseconds)
Sets the milliseconds division of the day (e.g.
|
public Object |
setUTCMinutes(Number minutes)
Sets the minutes division of the day (e.g.
|
public Object |
setUTCMonth(Number month)
Sets the month of the year (e.g.
|
public Object |
setUTCSeconds(Number seconds)
Sets the seconds division of the day (e.g.
|
public Object |
setYear(Number year)
|
public String |
toDateString()
Gets a human-readable String representation of the date (non-time) portion of the Date .
|
public String |
toGMTString()
|
public String |
toLocaleDateString()
Gets a human-readable String representation of the date (non-time) portion of the Date using a format indicated by the browser's Locale.
|
public String |
toLocaleString()
Gets a human-readable String representation of the Date using a format indicated by the browser's Locale.
|
public String |
toLocaleTimeString()
Gets a human-readable String representation of the time (non-date) portion of the Date using a format indicated by the browser's Locale.
|
public String |
toSource()
Gets a source code String representation of the Date .
|
public String |
toString()
Gets a human-readable String representation of the Date .
|
public String |
toTimeString()
Gets a human-readable String representation of the time (non-date) portion of the Date .
|
public String |
toUTCString()
|
public static Number |
UTC(Number year, Number month, Number dayOfTheMonth, Number hours, Number minutes, Number seconds, Number milliseconds)
Gets the number of milliseconds between the specified point in time since midnight of January 1st, 1970 according to Coordinated Universal Time (UTC).
|