Animations
API
Arrays
Async
Basics
Challenges
Classes
Console
Dates
Debugging
DOM Elements
DOM Methods
DOM Properties
Event Listeners
Flow Control
Forms
Functions
Global Functions
JSON
Keywords
Libraries (3rd party)
Math
Modules
Objects
Snippets
String
Types
Widgets
Window Object
Date methods let you GET and SET date values (years, months, days, hours, minutes, seconds, milliseconds).
getDate() |
Get the day as a number (1-31) |
getDay() |
Get the weekday as a number (0-6) |
getFullYear() |
Get the four digit year (yyyy) |
getHours() |
Get the hour (0-23) |
getMilliseconds() |
Get the milliseconds (0-999) |
getMinutes() |
Get the minutes (0-59) |
getMonth() |
Get the month (0-11) |
getSeconds() |
Get the seconds (0-59) |
getTime() |
Get the time (milliseconds since January 1, 1970) |