Every line of 'moment get current time' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
5 function getCurrentTime () { 6 var dt = moment ? moment().format('YYYY-MM-DD HH:mm:ss.SSS') : Date.now(); 7 return chalk ? chalk.grey(dt) : dt; 8 }
26 function getCurrentTime() { 27 //return the current time in format TTS can use 28 var d = new Date(); 29 var returnString = new String(); 30 returnString = " It is now, "; 31 returnString += d.getHours() + " " + d.getMinutes(); 32 returnString += ". "; 33 return returnString; 34 }
85 function getCurrentTime(serverTime) { 86 return serverTime ? serverTime.getTime() : (new Date()).getTime(); 87 }
12 function getCurrentDate() { 13 var now = new Date(); 14 return now.toISOString(); 15 }
52 function $time(){ 53 return new Date().getTime(); 54 };
10 function getTime(date = new Date()): string { 11 return moment(date).format(`YYYY-MM-DD HH:mm:ss`); 12 }
9 function mytime() { 10 var date = new Date() 11 return date.getTime(); 12 }
41 function get_time() { 42 return Date.now() + t_offset; 43 }
25 function getTime() { 26 if (!connected) { 27 return lastUpdateFromServer; 28 } 29 return lastUpdateFromServer + window.performance.now() - timeOfLastUpdateFromServer; 30 }
32 public static getUnixTimeFor2Days() { 33 return Util.getCurrentUnixTime(); 34 }