Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to show only time in hours and minutes only in javascript

function prettyDate2(time) {
  var date = new Date(parseInt(time));
  return date.toLocaleTimeString(navigator.language, {
    hour: '2-digit',
    minute:'2-digit'
  });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #time #hours #minutes #javascript
ADD COMMENT
Topic
Name
1+5 =