You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
itsgreggreg edited this page Sep 22, 2015
·
1 revision
// Create a Date ObjectvarrightNow=newDate();// Display the date as a string;rightNow.toString();// Shorthand for (new Date()).getTime();Date.now();// Actual date representation (seconds since unix epoch)rightNow.getTime();// Get individual partsrightNow.getMinutes();rightNow.getSeconds();rightNow.getMiliseconds();rightNow.getMonth();// Create a specific datevarmyBirthday=newDate(1984,8,22);now.getTime()-myBirthday.getTime()===now-myBirthday;// In our timezone this is epoch:Date.parse("December 31, 1969, 18:00:00");