JavaScript toLocaleString() Method : Date Object
Description
The toLocaleString() method is used to convert a date to a string, using the current locale time.
Version
Implemented in JavaScript 1.0
Syntax
toLocaleString()
Parameter
None
Example:
In the following web document toLocaleString() method converts the current date to a string,
View the example in the browser
Supported Browser
Internet Explorer 7 | Firefox 3.6 | Google Chrome 7 | Safari 5.0.1 | Opera 10 |
Yes | Yes | Yes | Yes | Yes |
See also:
JavaScript Core objects, methods, properties.
Previous: JavaScript setYear() Method: Date Object
Next: JavaScript toSource() Method: Date Object
Test your Programming skills with w3resource's quiz.