JavaScript Date toLocaleTimeString() Method
- Previous Page toLocaleDateString()
- Next Page toLocaleString()
- Go to the Previous Level JavaScript Date Reference Manual
Definition and Usage
toLocaleTimeString()
The method uses the locale settings convention to return the time part of the Date object as a string.
Example
Use the locale conventions to return the time part of the Date object as a string:
var d = new Date(); var n = d.toLocaleTimeString();
Syntax
Date.toLocaleTimeString()
Technical Details
Return Value: | A string representing a date in string format. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser Support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
toLocaleTimeString() | Support | Support | Support | Support | Support |
- Previous Page toLocaleDateString()
- Next Page toLocaleString()
- Go to the Previous Level JavaScript Date Reference Manual