Answers for "new time() javascript"

19

javascript get current time

var today = new Date();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
Posted by: Guest on March-30-2020
2

js set datetime

//new Date(year, month, day, hours, minutes, seconds, milliseconds)
new Date(1776, 6, 4, 12, 30, 0, 0);

// Timestamp method
new Date(-6106015800000);

// Date string method
new Date("January 31 1980 12:30");
Posted by: Guest on October-21-2020
0

js time function

const t0 = performance.now();
doSomething();
const t1 = performance.now();
console.log(`Call to doSomething took ${t1 - t0} milliseconds.`);
Posted by: Guest on May-30-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language