Date.toGMTString() : Date « Javascript Objects « JavaScript DHTML






Date.toGMTString()

   

<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>

   
    
    
  








Related examples in the same category

1.Date.toString()
2.Date.toLocaleString()
3.Date.toLocaleDateString()
4.Date.toLocaleTimeString()
5.Date.toUTCString()
6.'Date' Example