Template:Countdown/doc: Difference between revisions
Appearance
ReisuDesign (talk | contribs) No edit summary |
ReisuDesign (talk | contribs) |
||
| Line 67: | Line 67: | ||
==Examples== | ==Examples== | ||
{{Scrollbox| | {{Scrollbox| | ||
==Case: Offset== | ===Case: Offset=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 86: | Line 86: | ||
|TimeEndOffset=GMT+8 | |TimeEndOffset=GMT+8 | ||
}} | }} | ||
==Case: Upcoming== | ===Case: Upcoming=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 101: | Line 101: | ||
|TimeEnd=2025/01/31 03:59:59 GMT+8 | |TimeEnd=2025/01/31 03:59:59 GMT+8 | ||
}} | }} | ||
==Case: Started== | ===Case: Started=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 116: | Line 116: | ||
|TimeEnd=2050-01-31 03:59:59 GMT+8 | |TimeEnd=2050-01-31 03:59:59 GMT+8 | ||
}} | }} | ||
==Case: Long Ended== | ===Case: Long Ended=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 131: | Line 131: | ||
|TimeEnd=2020-01-31 03:59:59 GMT+8 | |TimeEnd=2020-01-31 03:59:59 GMT+8 | ||
}} | }} | ||
==Case: Blank Start== | ===Case: Blank Start=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 146: | Line 146: | ||
|TimeEnd=2050-01-31 03:59:59 GMT+8 | |TimeEnd=2050-01-31 03:59:59 GMT+8 | ||
}} | }} | ||
==Case: Blank Start Ended== | ===Case: Blank Start Ended=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 161: | Line 161: | ||
|TimeEnd=2020-01-31 03:59:59 GMT+8 | |TimeEnd=2020-01-31 03:59:59 GMT+8 | ||
}} | }} | ||
==Case: Blank End== | ===Case: Blank End=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 176: | Line 176: | ||
|TimeEnd= | |TimeEnd= | ||
}} | }} | ||
==Case: Blank End Started== | ===Case: Blank End Started=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 191: | Line 191: | ||
|TimeEnd= | |TimeEnd= | ||
}} | }} | ||
==Case: Invalid Start== | ===Case: Invalid Start=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 206: | Line 206: | ||
|TimeEnd=2050/01/31 03:59:59 GMT+8 | |TimeEnd=2050/01/31 03:59:59 GMT+8 | ||
}} | }} | ||
==Case: Invalid End== | ===Case: Invalid End=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 221: | Line 221: | ||
|TimeEnd=aaaaaaaaaaaa | |TimeEnd=aaaaaaaaaaaa | ||
}} | }} | ||
==Case: Invalid Start End== | ===Case: Invalid Start End=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 236: | Line 236: | ||
|TimeEnd=aaaaaaaaaaaa | |TimeEnd=aaaaaaaaaaaa | ||
}} | }} | ||
==Case: Blank== | ===Case: Blank=== | ||
<pre> | <pre> | ||
{{Countdown | {{Countdown | ||
| Line 253: | Line 253: | ||
}} | }} | ||
{{clr}} | {{clr}} | ||
==General Info== | ==General Info== | ||
(Countdown) - Parses EventName, TimeStart and TimeEnd into a countdown, mostly used on event mentioning pages. | (Countdown) - Parses EventName, TimeStart and TimeEnd into a countdown, mostly used on event mentioning pages. | ||
Latest revision as of 13:33, 13 September 2026
This is the documentation page for Countdown. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
This template uses JS found at MediaWiki:Gadget-Countdown.js.
See also: Template:Countdownall
Parameters
[edit source]Template for displaying a countdown
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Region | Region | The region the countdown is for
| Unknown | suggested |
| Start Offset | TimeStartOffset | The offset for the start time
| Unknown | suggested |
| End Offset | TimeEndOffset | The offset for the end time
| Unknown | suggested |
| Start Time | TimeStart | The time the event starts, formatted as a date
| Unknown | suggested |
| End Time | TimeEnd | The time the event ends, formatted as a date
| Unknown | required |
| Hide Text | HideText | Whether to hide the "ends in" text | Unknown | suggested |
| End Text | EndText | The text to display when the event ends | Unknown | suggested |
| Countdown Prefix | CountdownPrefix | The prefix to use for the end countdown instead of "Ends in:" | Unknown | suggested |
Examples
[edit source]Case: Offset
{{Countdown
|Region=AS
|EventName=Offset1
|TimeStart=2024/01/15 23:00:00
|TimeStartOffset=GMT+8
|TimeEnd=2050/01/31 03:59:59
|TimeEndOffset=GMT+8
}}
(AS) Ends in: 8495d 21h 43m 46s (Update)
Case: Upcoming
{{Countdown
|Region=AS
|EventName=TemplateExample1
|TimeStart=2050/01/15 23:00:00 GMT+8
|TimeEnd=2025/01/31 03:59:59 GMT+8
}}
(AS) Starts in: 8480d 16h 43m 47s (Update)
Case: Started
{{Countdown
|Region=AS
|EventName=TemplateExample2
|TimeStart=2021-01-8 10:00:00 GMT+8
|TimeEnd=2050-01-31 03:59:59 GMT+8
}}
(AS) Ends in: 8495d 21h 43m 46s (Update)
Case: Long Ended
{{Countdown
|Region=AS
|EventName=TemplateExample3
|TimeStart=2020-01-16 10:00:00 GMT+8
|TimeEnd=2020-01-31 03:59:59 GMT+8
}}
Case: Blank Start
{{Countdown
|Region=AS
|EventName=TemplateExample4
|TimeStart=
|TimeEnd=2025-01-31 03:59:59 GMT+8
}}
(AS) Ends in: 8495d 21h 43m 46s (Update)
Case: Blank Start Ended
{{Countdown
|Region=AS
|EventName=TemplateExample4
|TimeStart=
|TimeEnd=2020-01-31 03:59:59 GMT+8
}}
Case: Blank End
{{Countdown
|Region=AS
|EventName=TemplateExample5
|TimeStart=2025-01-31 03:59:59 GMT+8
|TimeEnd=
}}
(AS) Starts in: 8495d 21h 43m 46s (Update)
Case: Blank End Started
{{Countdown
|Region=AS
|EventName=TemplateExample5
|TimeStart=2020-01-31 03:59:59 GMT+8
|TimeEnd=
}}
Case: Invalid Start
{{Countdown
|Region=AS
|EventName=TemplateExample6
|TimeStart=aaaaaaaaaaaa
|TimeEnd=2050/01/31 03:59:59 GMT+8
}}
Case: Invalid End
{{Countdown
|Region=AS
|EventName=TemplateExample7
|TimeStart=2025/01/16 10:00:00 GMT+8
|TimeEnd=aaaaaaaaaaaa
}}
Case: Invalid Start End
{{Countdown
|Region=AS
|EventName=TemplateExample8
|TimeStart=aaaaaaaaaaaa
|TimeEnd=aaaaaaaaaaaa
}}
Case: Blank
{{Countdown
|Region=AS
|EventName=TemplateExample9
|TimeStart=
|TimeEnd=
}}
General Info
[edit source](Countdown) - Parses EventName, TimeStart and TimeEnd into a countdown, mostly used on event mentioning pages.
- Utilizes the parser functions {{#time:F d, Y h:i:s A e|}} and {{#time:F d, Y|}} and is thus able to accept a variety of formats which are parsed and stored internally as UTC.
- The following are accepted: backslashes (2019/1/1), dashes (2019-1-1), most manner of timezones (+9, +9 hours. +0930, JST, GMT +9) and commas in the correct spacing (November 20, 2019).
- The following are not accepted and will throw errors: any dots as they cause non integer values, including dot spacing (2019.1.1) and specifying timezones in non integer (+9.5).
- If no timezone is specified e.g. October 4, 2018 06:00, the syntax automatically assumes UTC.