Using the Date Object
You need to get date and time information.
You need to create an instance of the Date object. Depending on if you need the current time or some other time in the past or future, you may need to pass parameters to the constructor .
var now = new Date(); //returns todays date and time
var fluxCapacitorDate = new Date('November 5, 1955');
console.log(fluxCapacitorDate); //returns the date with time being all 0’ meaning midnight of that day.
var infinityWarDate = new Date(2018, 4, 4); //returns ...