Template:EventTimeLeft: Difference between revisions

From NOISZ Wiki
mNo edit summary
mNo edit summary
 
Line 5: Line 5:
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. [[Template:EventTimeLeftUnix|EventTimeLeftUnix]] looks at how many seconds we are into a cycle and divides it by 1209600, and returns a remainder. It subtracts that from 1209600, the amount of seconds in two weeks; this returns the amount of seconds left in this mini 2-week cycle within the greater 10-week 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:
EventTimeLeft is the countdown clock itself, and is:

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