We continue to develop resources related to the COVID-19 pandemic. See COVID-19 initiatives on Appropedia for more information.

Difference between revisions of "Template:Countdown/doc"

From Appropedia
Jump to navigation Jump to search
(→‎Simple Countdown Clock: nearer term example)
(→‎Usage: if event is in past or in progress.)
 
Line 14: Line 14:
  
 
Editors can use this template as a countdown clock for a lot of different events. The following can show you how to use this template.
 
Editors can use this template as a countdown clock for a lot of different events. The following can show you how to use this template.
 +
 +
'''Note: Time is in GMT (UTC).''' Adjust the time according, and date if necessary. [http://timeanddate.com/ timeanddate.com] is useful for this.
  
 
=== Simple Countdown Clock ===
 
=== Simple Countdown Clock ===
Line 24: Line 26:
 
  |month = 2
 
  |month = 2
 
  |day  = 14
 
  |day  = 14
  |event = unknown starts
+
  |event = unknown event
 
}}
 
}}
 
</pre>
 
</pre>
Line 34: Line 36:
 
  |month = 2
 
  |month = 2
 
  |day  = 14
 
  |day  = 14
  |event = unknown starts
+
  |event = unknown event
 
}}
 
}}
 +
 +
==== Notice for a finished event ====
 +
 +
'''Default notice''': If the event is in the past, it will look like this:
 +
 +
{{countdown
 +
|year  = 2012
 +
|month = 2
 +
|day  = 14
 +
|event = unknown event
 +
}}
 +
 +
 +
'''Customized notice''': If you want to customize the notice for the finished event, use ''eventend'' - e.g.:
 +
 +
<pre>{{countdown
 +
|year    = 2012
 +
|month    = 2
 +
|day      = 14
 +
|event    = unknown event
 +
|eventend = unknown has finished!
 +
}}</pre>
 +
 +
which creates:
 +
 +
{{countdown
 +
|year  = 2012
 +
|month = 2
 +
|day  = 14
 +
|event = unknown event
 +
|eventend  = unknown has finished!
 +
}}
 +
  
 
=== Advanced Countdown Clock ===
 
=== Advanced Countdown Clock ===
  
This type of countdown clock is suitable for events with a duration.
+
This type of countdown clock is suitable for events with a duration. It will display a fixed message during the event, defined by ''eventstart.'' If you want the countdown to happen during the event (e.g. how many days left in a fundraiser) then define the deadline as the eventstart, with duration 0. (Or use the simple version above.)
 +
 
 +
Note you ''must'' use whole numbers for time values - you can't use, for example, "1:18". Use the ''minute'' and ''second'' parameters if needed.
 +
 
 +
'''Duration is in seconds'''. This may be expressed as multiples, e.g. '''30*60'''  is 30 minutes, and '''2*60*60''' is 2 hours. Just put in the numbers - no units.
 +
 
 +
E.g. an event starting at the beginning of 2013, with a duration of 20 years:
  
 
<pre>
 
<pre>
 
{{countdown
 
{{countdown
  |year      = 9999
+
  |year      = 2013
 
  |month      = 1
 
  |month      = 1
 
  |day        = 1
 
  |day        = 1
Line 50: Line 91:
 
  |second    = 0
 
  |second    = 0
 
  |event      = unknown starts
 
  |event      = unknown starts
  |duration  = 100
+
  |duration  = 20*365*24*60*60
 
  |eventstart = unknown has started
 
  |eventstart = unknown has started
 
  |eventend  = unknown has ended
 
  |eventend  = unknown has ended
Line 56: Line 97:
 
</pre>
 
</pre>
  
If you type in the above, something like the following will appear.
+
 
 +
This event is currently in progress. If you type in the above, the following will appear:
  
 
{{countdown
 
{{countdown
  |year      = 9999
+
  |year      = 2013
 
  |month      = 1
 
  |month      = 1
 
  |day        = 1
 
  |day        = 1
 
  |hour      = 0
 
  |hour      = 0
  |minuite    = 0
+
  |minute    = 0
 
  |second    = 0
 
  |second    = 0
 
  |event      = unknown starts
 
  |event      = unknown starts
  |duration  = 100
+
  |duration  = 20*365*24*60*60
 
  |eventstart = unknown has started
 
  |eventstart = unknown has started
 
  |eventend  = unknown has ended
 
  |eventend  = unknown has ended
 
}}
 
}}
 +
  
 
<includeonly>
 
<includeonly>
 
</includeonly>
 
</includeonly>

Latest revision as of 22:55, 18 February 2013

Notes[edit]

Please note the following important points before using this template.

  • the time on this countdown clock is GMT (UTC+0)
  • if the event is held in more than 24 hours, only the number of days and the number of hours left will be shown
  • if the event is held within 24 hours, only the number of hours left will be shown
  • if the event is held within 1 hour, only the number of minutes left will be shown
  • if the event is held within 1 minute, only the number of seconds left will be shown

Usage[edit]

Editors can use this template as a countdown clock for a lot of different events. The following can show you how to use this template.

Note: Time is in GMT (UTC). Adjust the time according, and date if necessary. timeanddate.com is useful for this.

Simple Countdown Clock[edit]

This type of countdown clock is suitable for events with no duration.

{{countdown
 |year  = 2016
 |month = 2
 |day   = 14
 |event = unknown event
}}

If you type in the above, something like the following will appear.

unknown event has already ended. (refresh)

Notice for a finished event[edit]

Default notice: If the event is in the past, it will look like this:

unknown event has already ended. (refresh)


Customized notice: If you want to customize the notice for the finished event, use eventend - e.g.:

{{countdown
 |year     = 2012
 |month    = 2
 |day      = 14
 |event    = unknown event
 |eventend = unknown has finished! 
}}

which creates:

unknown has finished! (refresh)


Advanced Countdown Clock[edit]

This type of countdown clock is suitable for events with a duration. It will display a fixed message during the event, defined by eventstart. If you want the countdown to happen during the event (e.g. how many days left in a fundraiser) then define the deadline as the eventstart, with duration 0. (Or use the simple version above.)

Note you must use whole numbers for time values - you can't use, for example, "1:18". Use the minute and second parameters if needed.

Duration is in seconds. This may be expressed as multiples, e.g. 30*60 is 30 minutes, and 2*60*60 is 2 hours. Just put in the numbers - no units.

E.g. an event starting at the beginning of 2013, with a duration of 20 years:

{{countdown
 |year       = 2013
 |month      = 1
 |day        = 1
 |hour       = 0
 |minute     = 0
 |second     = 0
 |event      = unknown starts
 |duration   = 20*365*24*60*60
 |eventstart = unknown has started
 |eventend   = unknown has ended
}}


This event is currently in progress. If you type in the above, the following will appear:

unknown has started (refresh)