Extension:Countdown


 * See Extension:EventCountdown for an updated and maintained extension.

Countdown is a MediaWiki 1.5, and up, extension that allows a wiki page to display one or more "live" countdowns (using DHTML) to a specified date. It is designed to allow the countdown text to be formatted using wiki syntax. Once it is installed you invoke it via the  countdown  tag which accepts three arguments; Withing the countdown opening and closing tags you'll have four extra markups you can use to place the countdown components: After the timer hits zero, the numbers will turn negative (e.g. -1 seconds, -2 seconds, etc.) If  is set, the next time the page is rendered, whatever text is in that argument will be displayed instead of the timer. See below for some usage examples.
 * 1) time — this is the target time to count down to.
 * 2) name (optional) — used when there are more than one countdown on a page
 * 3) finishmessage — the message to display if the page is rendered after the target time
 *  — days to target time
 *  — hours to target time
 *  — minutes to target time
 *  — seconds to target time

Caveats:
 * The "time" attribute, while pretty flexible, must be written in some standard parseable form (parseable by javascript). Use the examples below and modify if you're not familiar with what formats that work.

Installation
Place the following code at the bottom of LocalSettings.php:

Example: Countdown to New Year 2015 (Eastern Standard Time, UTC minus 5 hours)

 * Days: 
 * Hours: 
 * Minutes: 
 * Seconds: 

Example: Countdown to 2015 Christmas Eve in Sweden; if the page is rendered after that date/time, say "Did you have a nice Christmas?"
 Santa will arrive in  days,  hours,  minutes and  seconds. Have you been a good boy/girl?  Santa will arrive in  days, <H> hours, <M> minutes. Have you been a good boy/girl?

Troubleshooting
If it says something like "D days, H hours, M minutes, and S seconds" instead of "281 days, 13 hours, 12 minutes, and 11 seconds", try purging the cache.

Changelog

 * v1.4 - 6 November 2013 - made it so that when the countdown hits zero, it stops instead of counting backward (e.g. -1, -2, etc.)
 * v1.3 - 1 November 2013 - added an optional  parameter.
 * v1.2 - 24 October 2007 - made the code a little leaner. Fixed a bug in instantiation.
 * v1.1 - 16 October 2007 - incorporated javascript into PHP file for better maintainability. Made the "name" parameter optional
 * v1.0 - 14 October 2007 - added info so that Special:Version displays correctly for this extension
 * ?? - original version