Date.toLocaleString()
<html> <head> <title>A Dated Example</title> </head></body> <script type="text/javascript"> var dtNow = new Date(); dtNow.setDate(18); dtNow.setMonth(10); dtNow.setYear(2008); dtNow.setHours(7); dtNow.setMinutes(2); document.writeln(dtNow.toString() + "<br />"); document.writeln(dtNow.toLocaleString() + "<br />"); document.writeln(dtNow.toLocaleDateString() + "<br />"); document.writeln(dtNow.toLocaleTimeString() + "<br />"); document.writeln(dtNow.toGMTString() + "<br />"); document.writeln(dtNow.toUTCString()); </script> </body> </html>