Description
The toLocaleDateString() method returns the date portion of a Date object as a string, using locale conventions.
This method has the form:
Date.toLocaleDateString()
Examples
The following example shows the basic use of this method.
<script>
var d = new Date();
document.write(d.toLocaleDateString());
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|