JavaScript Date and Time Functions. Check out the example, How to Display the Current Date and Time using JavaScript.
Object | Methods | Description |
---|---|---|
Date Function | getDate() | Get the Date of the Month. |
getDay() | Get the Day of the Week. | |
getFullYear() | Get the Full Year in four Digit. | |
getHours() | Get the Hours between 0 to 23. | |
getMilliseconds() | Get the Milliseconds between 0 to 999. | |
getMinutes() | Get the Minutes between 0 to 59. | |
getMonth() | Get the Month between 0 to 11. | |
getSeconds() | Get the Seconds between 0 to 59. | |
getTime() | Get the Milliseconds since Jan 1, 1970. | |
getUTCDate() | Get the Universal Time Date of the Month. | |
getUTCFullYear() | Get the Universal Time Full Year in four Digits. | |
getUTCHours() | Get the Universal Time Hours between 0 to 23. | |
getUTCMilliseconds() | Get the Universal Time Milliseconds (0 to 999). | |
getUTCMinutes() | Get the Universal Time Minutes between 0 to 59. | |
getUTCMonth() | Get the Universal Time Month between 0 to 11. | |
getUTCSeconds() | Get the Universal Time Seconds between 0 to 59. | |
setDate() | Set the Date of the Month. | |
setFullYear() | Set the Full Year in four Digit. | |
setHours() | Set the Hours between 0 to 23. | |
setMilliseconds() | Set the Milliseconds between 0 to 999. | |
setMinutes() | Set the Minutes between 0 to 59. | |
setMonth() | Set the Month between 0 to 11. | |
setSeconds() | Set the Seconds between 0 to 59. | |
setTime() | Set the Milliseconds since Jan 1, 1970. | |
setUTCDate() | Set the Universal Time Date of the Month. | |
setUTCFullYear() | Set the Universal Time Full Year in four Digits. | |
setUTCHours() | Set the Universal Time Hours between 0 to 23. | |
setUTCMilliseconds() | Set the Universal Time MilliSeconds (0 to 999). | |
setUTCMinutes() | Set the Universal Time Minutes between 0 to 59. | |
setUTCMonth() | Set the Universal Time Month between 0 to 11. | |
setUTCSeconds() | Set the Universal Time Seconds between 0 to 59. | |
toString() | Converts the Date object into string. | |
toUTCString() | Converts the Date object into Universal Time string. |