Date

Date Class is a class for treating the date.The value got from the calendar parts is stored as a Date Class.By using a constructor without an argument, you can get a current date*1.

getDate()

Returns the day of the month for the specified date according to local time.

getDay()

Returns a number representing the day of the week for the specified date according to local time.(0:Sunday~6:Saturday

getHours()

Returns the hour for the specified date according to local time.

getFullYear()

Returns the year of the specified date according to local time.

getMilliseconds()

Returns the number of milliseconds in the specified date according to local time.

getMinutes()

Returns the minutes in the specified date according to local time.

getMonth()

Returns the month (from 0-11) in the specified date according to local time.

getSeconds()

Returns the seconds in the specified date according to local time.

getTime()

Returns the numeric value corresponding to the time for the specified date according to universal time.

getTimezoneOffset()

Returns the time-zone offset in minutes for the current locale.

getUTCDate()

Returns the day (date) of the month in the specified date according to universal time.

getUTCDay()

Returns the day of the week in the specified date according to universal time.

getUTCFullyear()

Returns the year in the specified date according to universal time.

getUTCMinutes()

Returns the minutes in the specified date according to universal time.

getUTCMonth()

Returns the month of the specified date according to universal time.

getUTCMilliseconds()

Returns the milliseconds in the specified date according to universal time.

getUTCSeconds()

Returns the seconds in the specified date according to universal time.

parse(string)

Parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00, local time.

setDate(date)

Sets the day of the month for a specified date according to local time.

setFullYear(year [, month[, date]])

Sets the full year for a specified date according to local time.

setHours(hour [, min[, sec[, ms]]])

Sets the hours for a specified date according to local time.

setMinutes(min [, sec[, ms])

Sets the minutes for a specified date according to local time.

setMonth(month [, date])

Set the month for a specified date according to local tim.

setMilliseconds(ms)

Sets the milliseconds for a specified date according to local time.

setSeconds(sec [, ms])

Sets the seconds for a specified date according to local time.

setTime(time)

Sets the value of a Date object according to local time.

setUTCDate(date)

Sets the day of the month for a specified date according to universal time.

setUTCFullYear(year [, month[, date]])

Sets the full year for a specified date according to universal time.

setUTCHours(hour [, min[, sec[, ms]]])

Sets the hour for a specified date according to universal time.

setUTCMinutes(min [, sec[, ms]])

Sets the minutes for a specified date according to universal time.

setUTCMonth(month [, date])

Sets the month for a specified date according to universal time.

setUTCMilliseconds(ms)

Sets the milliseconds for a specified date according to universal time.

setUTCSeconds(sec [, ms])

Sets the seconds for a specified date according to universal time.

toDateString()

Returns a string version of the Date object expressed in local time.

toLocaleDateString()

Converts a date to a string, returning the "date" portion using the current locale's conventions.

toLocaleString()

Converts a date to a string, using the current locale's conventions.

toLocaleTimeString()

Converts a date to a string, returning the "date" portion using the current locale's conventions.

toTimeString()

Returns a string representation of the time portion of a Date object, expressed in local time.

toUTCString()

Converts a date to a string, using the universal time convention.


*1 var d = new Date();