Live Date Script

Display the full date and time on your site.

About This Script

Paste the code anywhere on your page you would like it to appear.

Demo

Code

<script> /* * Display the current date and time. * From http://www.top-site-list.com */ (function(){ function date(e,t){var n=this;var r,i;var s=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"];var o=/\\?(.?)/gi;var u=function(e,t){return i[e]?i[e]():t};var a=function(e,t){e=String(e);while(e.length<t){e="0"+e}return e};i={d:function(){return a(i.j(),2)},D:function(){return i.l().slice(0,3)},j:function(){return r.getDate()},l:function(){return s[i.w()]+"day"},N:function(){return i.w()||7},S:function(){var e=i.j();var t=e%10;if(t<=3&&parseInt(e%100/10,10)==1){t=0}return["st","nd","rd"][t-1]||"th"},w:function(){return r.getDay()},z:function(){var e=new Date(i.Y(),i.n()-1,i.j());var t=new Date(i.Y(),0,1);return Math.round((e-t)/864e5)},W:function(){var e=new Date(i.Y(),i.n()-1,i.j()-i.N()+3);var t=new Date(e.getFullYear(),0,4);return a(1+Math.round((e-t)/864e5/7),2)},F:function(){return s[6+i.n()]},m:function(){return a(i.n(),2)},M:function(){return i.F().slice(0,3)},n:function(){return r.getMonth()+1},t:function(){return(new Date(i.Y(),i.n(),0)).getDate()},L:function(){var e=i.Y();return e%4===0&e%100!==0|e%400===0},o:function(){var e=i.n();var t=i.W();var n=i.Y();return n+(e===12&&t<9?1:e===1&&t>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return i.Y().toString().slice(-2)},a:function(){return r.getHours()>11?"pm":"am"},A:function(){return i.a().toUpperCase()},B:function(){var e=r.getUTCHours()*3600;var t=r.getUTCMinutes()*60;var n=r.getUTCSeconds();return a(Math.floor((e+t+n+3600)/86.4)%1e3,3)},g:function(){return i.G()%12||12},G:function(){return r.getHours()},h:function(){return a(i.g(),2)},H:function(){return a(i.G(),2)},i:function(){return a(r.getMinutes(),2)},s:function(){return a(r.getSeconds(),2)},u:function(){return a(r.getMilliseconds()*1e3,6)},e:function(){throw"Not supported (see source code of date() for timezone on how to add support)"},I:function(){var e=new Date(i.Y(),0);var t=Date.UTC(i.Y(),0);var n=new Date(i.Y(),6);var r=Date.UTC(i.Y(),6);return e-t!==n-r?1:0},O:function(){var e=r.getTimezoneOffset();var t=Math.abs(e);return(e>0?"-":"+")+a(Math.floor(t/60)*100+t%60,4)},P:function(){var e=i.O();return e.substr(0,3)+":"+e.substr(3,2)},T:function(){return"UTC"},Z:function(){return-r.getTimezoneOffset()*60},c:function(){return"Y-m-d\TH:i:sP".replace(o,u)},r:function(){return"D, d M Y H:i:s O".replace(o,u)},U:function(){return r/1e3|0}};this.date=function(e,t){n=this;r=t===undefined?new Date:t instanceof Date?new Date(t):new Date(t*1e3);return e.replace(o,u)};return this.date(e,t)} function updateDate() { var str = date('l F jS Y H:i:s'); var elements = document.getElementsByClassName('liveDate'); for (var i = 0, element; element = elements[i]; i++) { element.innerHTML = str; } } function padTime(i) { if (i < 10) { i = '0' + i; }; return i; } setInterval(updateDate, 1000); })(); </script> <noscript>Clock provided by <a href="http://www.top-site-list.com">Top Site List Planet</a></noscript> <span class="liveDate"></span>
More scripts

Do you want to expose your site to millions?
Do you want to be ranked higher in Google?
Do you want to be known as the best site in your niche?

Then look no further. Add your site in 3 simple steps. Sign up, Add your site and Start receiving votes! It only takes 10 seconds!

Sign Up to Top Site List Planet Now!

Login with one of these social networks...

Sign in with FacebookSign in with TwitterSign in with Google+Sign in with Yahoo!Sign in with LinkedIn

or create an account with your email...

Login To An Existing Account