GMT Calculator : Date : Development JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Development » Date »

 

GMT Calculator



 <html>
<head>
<title>GMT Calculator</title>
<script type="text/javascript">
function calcGMT(form) {
    var date = new Date(form.year.value, form.month.value, form.date.value, 
                         form.hour.value, form.minute.value, form.second.value);
    form.output.value = date.toUTCString();
}
</script>
</head>
<body>
<form>
<b>Enter a local date/time</b><br>
Year:<input type="text" name="year" value="0000"><br>
Month (0-11):<input type="text" name="month" value="0"><br>
Date (1-31):<input type="text" name="date" value="0"><br>
Hour (0-23):<input type="text" name="hour" value="0"><br>
Minute (0-59):<input type="text" name="minute" value="0"><br>
Second (0-59):<input type="text" name="second" value="0"><br>
<input type="button" value="Get GMT" onclick="calcGMT(this.form)"><br>
GMT: <input type="text" name="output" size="60">
</body>
</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Development
» Date