Forum:How to use countdown timer?

How do I use the countdown timer? I saw the code in the dev wikia but I don't understand how to really put it in a page. Lion Turtle (talk &bull; contribs) 07:09, September 1, 2011 (UTC)

This: If you can see this, it means you have not set the countdown or your Javascript settings correctly.

Syntax: Month Where "Month" is the Full month (e.g. January, February etc.) Where "DD" is date (e.g. 01, 10, 31 etc.) Where "YYYY" is the four digit year. (e.g. 1066, 2009, 3000 etc.) Where "HH:MM:SS" stands for Hours:Minutes:Seconds (e.g. 00:00:00 or 23:59:59 etc.) Where "Time-zone" is the three or four letter abbreviation of your time-zone (e.g. PST, GMT, CEST etc. )

Examples are included on talkpage.

If you still see the T minus and T plus then clear your browsers cache and refresh the page. goes on a template page.

This: // // ***************************************************** // * Experimental javascript countdown timer (Splarka) * // * Version 0.0.3                                    * // ***************************************************** // // Usage example: // //  Only January 01 2007 00:00:00 PST until New years. // //  Javascript disabled. function updatetimer(i) { var now = new Date; var then = timers[i].eventdate; var diff = count=Math.floor((then.getTime-now.getTime)/1000); // catch bad date strings if(isNaN(diff)) { timers[i].firstChild.nodeValue = '** ' + timers[i].eventdate + ' **' ; return; } // determine plus/minus if(diff<0) { diff = -diff; var tpm = ''; } else { var tpm = ''; } // Calculate the diff - Modified by Eladkse if ((diff%60) == 1) { left = (diff%60) + ' second'; } else { left = (diff%60) + ' seconds'; }   diff=Math.floor(diff/60); if(diff > 0) { if ((diff%60) == 1) { left = (diff%60) + ' minute, and ' + left; } else { left = (diff%60) + ' minutes, and ' + left; } }    diff=Math.floor(diff/60); if(diff > 0) { if ((diff%24) == 1) { left = (diff%24) + ' hour, ' + left; } else { left = (diff%24) + ' hours, ' + left; } }    diff=Math.floor(diff/24); if(diff > 0) { if (diff == 1) { left = diff + ' day, ' + left; } else { left = diff + ' days, ' + left; } }  timers[i].firstChild.nodeValue = tpm + left; // a setInterval is more efficient, but calling setTimeout // makes errors break the script rather than infinitely recurse timeouts[i] = setTimeout('updatetimer(' + i + ')',1000); } function checktimers { //hide 'nocountdown' and show 'countdown' var nocountdowns = getElementsByClassName(document, 'span', 'nocountdown'); for(var i in nocountdowns) nocountdowns[i].style.display = 'none' var countdowns = getElementsByClassName(document, 'span', 'countdown'); for(var i in countdowns) countdowns[i].style.display = 'inline' //set up global objects timers and timeouts. timers = getElementsByClassName(document, 'span', 'countdowndate'); //global timeouts = new Array; // generic holder for the timeouts, global if(timers.length == 0) return; for(var i in timers) { timers[i].eventdate = new Date(timers[i].firstChild.nodeValue); updatetimer(i); //start it up  } } addOnloadHook(checktimers); // ************************************************** // - end -  Experimental javascript countdown timer // ************************************************** // goes in MediaWiki:Common.js. Then clear your cache and follow the instructions on the template page to add it to a page.

Thank you. So, I have to put the dates until the countdown will go back? I mean, if I have to make a countdown till 10th September, I'll have to put the necessary details for 10th September? Thanks again. Lion Turtle (talk &bull; contribs) 08:54, September 4, 2011 (UTC)