It provides methods to get and set day, month, year, hour, minute, second and millisecond.
The date objects are created with new Date() constructor.
a. new Date()
b. new Date(year, month, day, hours, minutes, seconds, milliseconds)
c. new Date(milliseconds)
d. new Date(date string)
The new Date() method creates a new date object with current date and time.
For example, the following code will store today’s date and time in variable “today”.
var today = new Date();