Date.toTimeString

toTimeString – Converts a Date object to a string.

Description

Date.toTimeString()

Interpreters might implement the result of toTimeString to give different return values, it is recomended to use the toLocaleTimeString method instead.

Return values

string primitive.

Examples

Example #1 – toTimeString example
var date = new Date(); console.log(date.toTimeString()); // Returns a string representation of the given time.

See also

External references