The toUTCString Method

The toUTCString() method converts a date to a UTC string (a date display standard).

HTML file: Displayed by browser:
<body>
<p>The toUTCString() method converts a date to a UTC string (date display standard):</p>
<p id="demo"></p>

<script>
var d = new Date();
document.getElementById("demo").innerHTML = d.toUTCString();
</script>
</body>

The toUTCString() method converts a date to a UTC string (date display standard):


BackTable of ContentsNext