Every line of 'what is the code for getting the 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.
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 }