Description
The toUTCString() method converts a Date object to a string, according to universal time.
This method has the form:
Date.toUTCString()
Note: This method is called by JavaScript automatically whenever a Date object is used in a situation requiring a string.
Examples
The following example shows the basic use of this method.
<script>
var d = new Date();
document.write(d.toUTCString());
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|