Template:EventTimeLeft: Difference between revisions

From NOISZ Wiki
No edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
<noinclude>
<noinclude>
This details how much time left is on an event, according to the time between now and the next 2-week waypoint in the standard 10-week event cycle.
This details how much time left is on an event, according to the time between now and the next 2-week waypoint in the standard 10-week event cycle.
The countdown clocks for [[Template:EventTimeLeft|EventTimeLeft]] and [[Template:EventCountdown|EventCountdown]] use markers to count down to.
EventTimeLeft is the countdown clock itself, and is:
<nowiki><span class="countdown" data-end="stop" data-options="short-format" style="display:none;">Ends: <span class="countdowndate">{{#time:r|@{{#expr:{{EventTimeLeftUnix|cyclestart={{{cyclestart}}}}} + {{#time:U|now}}}}}}</span></span>
{{#widget: CountdownTimer}}</nowiki>
The time it's counting down to is <nowiki>{{#time:r|@{{#expr:{{EventTimeLeftUnix|cyclestart={{{cyclestart}}}}} + {{#time:U|now}}}}}}</nowiki>, which adds the seconds left in the 2-week cycle that is a single event to the current time in Unix (the amount of seconds elapsed since 1 January 1970), and then counts down to it.
This draws on the [[:Widget:CountdownTimer|CountdownTimer]] widget required to make the countdown timers actually work; "data-
[[Category:Templates]]
[[Category:Templates]]
{{NOISZ Timer Flowchart}}
{{NOISZ Timer Flowchart}}
</noinclude>
</noinclude>

Latest revision as of 19:15, 5 February 2026


This details how much time left is on an event, according to the time between now and the next 2-week waypoint in the standard 10-week event cycle.

The countdown clocks for EventTimeLeft and EventCountdown use markers to count down to.

EventTimeLeft is the countdown clock itself, and is:

<span class="countdown" data-end="stop" data-options="short-format" style="display:none;">Ends: <span class="countdowndate">{{#time:r|@{{#expr:{{EventTimeLeftUnix|cyclestart={{{cyclestart}}}}} + {{#time:U|now}}}}}}</span></span> {{#widget: CountdownTimer}}

The time it's counting down to is {{#time:r|@{{#expr:{{EventTimeLeftUnix|cyclestart={{{cyclestart}}}}} + {{#time:U|now}}}}}}, which adds the seconds left in the 2-week cycle that is a single event to the current time in Unix (the amount of seconds elapsed since 1 January 1970), and then counts down to it.

This draws on the CountdownTimer widget required to make the countdown timers actually work; "data-

Timer Templates

Template:EventCycleTime Module:CurrentNOISZSLEvent
Module:CurrentSyntheticEvent
Template:CurrentNoiszSLEvent
Template:CurrentSyntheticEvent
Template:EventTimeLeftUnix Template:EventTimeLeft Template:NOISZ SL Events
Template:NOISZ SL Events Vertical
Template:NOISZ SL Recursive Events
Template:NOISZ SL Synthetic Events
Template:EventTimeCountdownUnix Template:EventCountdown