Template:Countdown
From Guild Wars 2 Wiki
Jump to navigationJump to search
Description[edit]
This template uses Widget:Countdown to display a countdown to a specified time, and optionally to times offset by an interval after that.
Usage[edit]
{{Countdown|<target>}} {{Countdown|<target>|<interval>}} {{Countdown|<target>|<interval>|ns=<no script text>}}
Parameters[edit]
- 1 (unnamed parameter)
- The time to count down to as a time value as understood by #time.
- 2 (unnamed parameter)
- Optional. The duration of the intervals to count down to after reaching the time specified as unnamed parameter 1 in seconds or as one of
daily
(equivalent to 1*24*60*60 seconds) orweekly
(equivalent to 7*24*60*60 seconds). - If not specified the countdown will stop when reaching the time specified as unnamed parameter 1.
- ns
- Optional. The text that should be displayed if scripting is unavailable.
- If not specified defaults to the value of unnamed parameter 1 formated via #time using
c
preceeded by<Countdown to
and succeeded by.>
.
- sitenotice
- Optional. Set to
y
when using the template in the sitenotice to cause the template to pass a different namespace to the widget to prevent countdowns from intermingling with each other due to duplicate IDs caused by distinct ID counts being maintained by the Widget extension for the sitenotice and article content.
Examples[edit]
* End of UTC day (Midnight UTC/daily reset time): <span style="font-family: Courier New, monospace;">{{countdown| {{#time: c| 00:00 + 1 day }} | {{#expr: 1*24*60*60}} }}</span>. {{#vardefine: tyriandayend | {{#time: c | @{{#expr: {{#time: U}} + ( (2*60*60) - ( {{#time: U}} mod (2*60*60) ) ) }} }} }}<!-- -->* End of Tyrian day (Midnight [[Day and night|Tyrian Time]]): <span style="font-family: Courier New, monospace; color: blue;">{{countdown| {{#var: tyriandayend}} | {{#expr: 2*60*60}} }}</span>.
- End of UTC day (Midnight UTC/daily reset time): <Countdown to 2024-11-03T00:00:00+00:00.>.
- End of Tyrian day (Midnight Tyrian Time): <Countdown to 2024-11-02T22:00:00+00:00.>.