Javascript Date toTimeString()

Introduction

Javascript Date toTimeString() displays the date's hours, minutes, seconds, and time zone in an implementation-specific format.

The output of this method varies from browser to browser.

dateObj.toTimeString()
let d = new Date(2020, 6, 18, 14, 39, 7);

console.log(d.toString());     /*w w w. j  a v a 2s  . co m*/
console.log(d.toTimeString()); 



PreviousNext

Related