Extension:Countdown


 * See Extension:EventCountdown for an updated and maintained extension.
 * This extension does not work with MediaWiki 1.19+.

The Countdown extension displays a "live" countdown to a specified date.

Features
Countdown text to be formatted using wiki syntax.

Countdown can be modified in three ways:
 * 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

Withing the countdown opening and closing tags you'll have four extra markups you can use to place the countdown components:
 *  — days to target time
 *  — hours to target time
 *  — minutes to target time
 *  — seconds to target time

After the timer hits zero, it stops (as of v1.4). 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.

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
Example: Countdown to New Year 2015 (Eastern Standard Time, UTC minus 5 hours) 
 * Days: 
 * Hours: 
 * Minutes: 
 * Seconds: 

Example
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