Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 4
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");