»
EnglishFrenchVietnamese

Print - Date-Clock-Internet Time script - JavaScriptBank.com

Full version: jsB@nk » Time » Clock » Date-Clock-Internet Time script
URL: https://www.javascriptbank.com/date-clock-internet-time-script.html

Date-Clock-Internet Time script © JavaScriptBank.comReads your system time/date and displays it on the page, complete with Internet time. Neat! IE4+ and NS6+

Full version: jsB@nk » Time » Clock » Date-Clock-Internet Time script
URL: https://www.javascriptbank.com/date-clock-internet-time-script.html



JavaScript
<SCRIPT LANGUAGE="JavaScript">// Chris ([email protected]) | http://www.crashedstar.com/var dayarray=newArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")var montharray=newArray("January","February","March","April","May","June","July","August","September","October","November","December")function getthedate(){var mydate=new Date()var year=mydate.getYear()if (year < 1000)year+=1900var day=mydate.getDay()var month=mydate.getMonth()var daym=mydate.getDate()if (daym<10)daym="0"+daymvar hours=mydate.getHours()var minutes=mydate.getMinutes()var seconds=mydate.getSeconds()var dn="AM"if (hours>=12)dn="PM"if (hours>12){hours=hours-12}{ d = new Date(); Time24H = new Date(); Time24H.setTime(d.getTime() +(d.getTimezoneOffset()*60000) + 3600000); InternetTime =Math.round((Time24H.getHours()*60+Time24H.getMinutes()) / 1.44); if(InternetTime < 10) InternetTime = '00'+InternetTime; else if(InternetTime < 100) InternetTime = '0'+InternetTime;}if (hours==0)hours=12if (minutes<=9)minutes="0"+minutesif (seconds<=9)seconds="0"+seconds//change font size herevar cdate=dayarray[day]+", "+montharray[month]+" "+daym+" "+year+" |"+hours+":"+minutes+":"+seconds+" "+dn+" | @"+InternetTime+""if (document.all)document.all.clock.innerHTML=cdateelse if (document.getElementById)document.getElementById("clock").innerHTML=cdateelsedocument.write(cdate)}if (!document.all&&!document.getElementById)getthedate()function goforit(){if (document.all||document.getElementById)setInterval("getthedate()",1000)}window.onload=goforit// End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<span id="clock"></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->