| |
Methods and Properties of the Date Object |
|
Method
getDate() Returns the date within month (1 to 31).
getDay() Returns the day within the week (0 to 6).
getFullYear() Returns the year in local time with four digits.
getHours() Returns the hour within the day (0 to 23).
getMilliseconds() Returns the milliseconds.
getMinutes() Returns the minutes within the hour (0 to 59).
getMonth() Returns the month within the year (0 to 11).
getSeconds() Returns seconds within the minute (0 to 59).
getTime() Returns the number of milliseconds since 1/1/70 00:00:00.
getTimeZoneOffset() Returns minutes offset from GMT/UTC.
getUTCDate() Returns the day of the month.
getUTCDay() Returns the day of the week converted to universal time.
getUTCFullYear() Returns a four-digit representation of the year converted to universal time.
getUTCHours() Returns the hour converted to universal time.
getUTCMilliseconds()Returns the milliseconds converted to universal time.
getUTCMinutes() Returns the minutes converted to universal time.
getUTCMonth() Returns the month converted to universal time.
getUTCSeconds() Returns the seconds converted to universal time.
getYear() Returns number of years since 1900.
parse() Converts the passed-in string date to milliseconds.
setDate() Sets the date within the month (1 to 31).
setFullYear() Sets the year as a four-digit number.
setHours() Sets hour within day (0 to 23).
setMilliseconds() Sets the milliseconds.
setMinutes() Sets the minutes within the hour (0 to 59).
setMonth() Sets the month within the year (0 to 11).
setSeconds() Sets the seconds within the minute (0 to 59).
setTime() Sets the number of milliseconds since 1/1/70 00:00:00.
setUTCdate() Sets the day of the month in universal time.
setUTCFullYear() Sets the year as a four-digit number in universal time.
setUTCHours() Sets the hour in universal time.
setUTCMilliseconds() Sets the milliseconds in universal time.
setUTCMinutes() Sets the minutes in universal time.
setUTCMonth() Sets the month in universal time.
setUTCSeconds() Sets the seconds in universal time.
setYear() Sets the number of years since 1900.
toGMTString() Returns the date string in universal format.
toLocalString() Returns the date string in the local system's format.
toSource() Returns the source of the Date object.
toString() Returns the date and time as a string in local time.
toUTCString() Returns the data and time as a string in universal time (UTC).
UTC() Convertscomma-delimited values to milliseconds of UTC date.
valueOf() Returns the equivalence of the Date object in milliseconds.
Property
prototype Property that allows you to add methods and properties to the Date object.
|
|
|
Related examples in the same category |
|