Source code var d1 = new Date(); // get current date var d2 = new Date(); // get current date d2.setFullYear(1965); // set year to 1965 // display both dates and negative milliseconds for 1965 date document.writeln('Current date: ' + d1 + ''); document.writeln('Same day in 1965: ' + d2 + ''); document.writeln('Second date in milliseconds since 1/1/1970: ' + d2.getTime() + '');