Template:EventCountdown: Difference between revisions

From NOISZ Wiki
(fuyutsuki. let us begin. (switching event countdown back to old timer style))
No edit summary
Line 1: Line 1:
<includeonly>{{#if: {{{countdown|}}} | <span class="countdown" data-options="short-format" style="display:none;" data-end="callback" data-callback="selfNullEdit">Starts: <span class="countdowndate">{{#time:F d, Y H:i T|@{{#expr:{{EventTimeCountdownUnix|cyclestart={{{cyclestart|}}}|eventstyle={{{eventstyle|LUNATIC MAINFRAME}}}}} + {{#time:U|now}}}}}}</span></span> | Starts: {{#time:F d, Y H:i T|@{{#expr:{{EventTimeCountdownUnix|cyclestart={{{cyclestart|}}}|eventstyle={{{eventstyle|LUNATIC MAINFRAME}}}}} + {{#time:U|now}}}}}}
<includeonly>{{#if: {{{countdown|}}} | <span class="countdown" data-options="short-format" style="display:none;" data-end="callback" data-callback="selfNullEdit">Starts: <span class="countdowndate">{{#time:F d, Y H:i T|@{{#expr:{{EventTimeCountdownUnix|cyclestart={{{cyclestart|}}}|eventstyle={{{eventstyle|LUNATIC MAINFRAME}}}}} + {{#time:U|now}}}}}}</span></span> | Starts: {{#time:F d, Y H:i T|@{{#expr:{{EventTimeCountdownUnix|cyclestart={{{cyclestart|}}}|eventstyle={{{eventstyle|LUNATIC MAINFRAME}}}}} + {{#time:U|now}}}}}}
}}
}}
{{ #widget: CountdownTimer }}
{{#widget:CountdownTimer}}
</includeonly>
</includeonly>
<noinclude>
<noinclude>
Line 8: Line 8:
Example:
Example:


<code><nowiki>{{EventCountdown}}</nowiki></code>
<pre><nowiki>
{{EventCountdown
|eventstyle=Attitude Mint
|cyclestart=2025-12-12 04:53
|countdown=true
}}
</nowiki></pre>


{{EventCountdown}}
Yields:
 
{{EventCountdown|eventstyle=Attitude Mint|cyclestart=2025-12-12 04:53|countdown=true}}
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 16:36, 4 December 2025


This counts down the time until the recurrent event for a given style, and gives a differing output format depending on how many parameters are input.

Example:

{{EventCountdown
|eventstyle=Attitude Mint
|cyclestart=2025-12-12 04:53
|countdown=true
}}

Yields: