(24 Hour)
Military Time.
(12 Hour)
Civilian Time.






The HTML code for this clock is below, and can be cut/copied/pasted. As it is, this clock will not work if accessed by a <embed src="http://.........> tag. Just put the code within your webpage for normal access and viewing.



<html> <head> <SCRIPT LANGUAGE="JavaScript"> function showMilitaryTime() { if (document.form.showMilitary[0].checked) { return true; } return false; } function showTheHours(theHour) { if (showMilitaryTime() || (theHour > 0 && theHour < 13)) { if (theHour == "0") theHour = 12; return (theHour); } if (theHour == 0) { return (12); } return (theHour-12); } function showZeroFilled(inValue) { if (inValue > 9) { return "" + inValue; } return "0" + inValue; } function showAmPm() { if (showMilitaryTime()) { return (""); } if (now.getHours() < 12) { return (" am"); } return (" pm"); } function showTheTime() { now = new Date document.form.showTime.value = showTheHours(now.getHours()) + ":" + showZeroFilled(now.getMinutes()) + ":" + showZeroFilled(now.getSeconds()) + showAmPm() setTimeout("showTheTime()",1000) } </script> <body bgcolor="black"> <body onLoad="showTheTime()"> <center> <table bgcolor="black"border="6"> <tr> <td align="center"> <font color="yellow"> <form name=form> <input type=text name=showTime size=11> <hr> <input type=radio name=showMilitary checked> (24 Hour) <br> Military Time. <hr> <input type=radio name=showMilitary> (12 Hour) <br> Civilian Time. <br> </form> </tr> </td> </table> </center> </font> </body> </html>