Skip to content

Instantly share code, notes, and snippets.

/***Dates */
//JavaScript counts months from 0 to 11. January is 0. December is 11.
new Date()
// new Date(year, month, day, hours, minutes, seconds, milliseconds)
new Date(2018, 11, 24, 10, 33, 30, 0); // month is 0 -11
// new Date(milliseconds)
var d = new Date(86400000);
// JavaScript stores dates as number of milliseconds since January 01, 1970, 00:00:00 UTC (Universal Time Coordinated).