Date.toLocaleTimeString() (Method)

The value of the Date object is presented just as a time taking the present locale into consideration.

Availability:

ECMAScript edition - 3
JavaScript - 1.5
JScript - 5.5
Internet Explorer - 5.5
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myDate.toLocaleTimeString()

The date value is removed and only the time value is presented by this method. Any locale specific character encoding is performed as necessary. If the implementation is particularly well endowed with internationalization code, this is an opportunity to substitute leading zeros if necessary.

Cross-references:

ECMA 262 edition 3 - section - 15.9.5.7