Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get current formatted time in javascript

const date = new Date(); // get the current date
console.log(date.toLocaleTimeString("en-us", {timeStyle: "short"})); // time
 
PREVIOUS NEXT
Tagged: #current #formatted #time #javascript
ADD COMMENT
Topic
Name
2+5 =