Difference between revisions of "Template:DYK queue/next empty"

From blackwiki
Jump to navigation Jump to search
imported>MSGJ
(update for 7 queues)
imported>MSGJ
(output zero if all queues are full)
 
Line 1: Line 1:
{{#expr: ({{Did you know/Queue/Next}} - {{DYK queue/number of empty}} + 6) mod 7 + 1}}<noinclude>
+
{{#ifexpr:{{DYK queue/number of empty}}=0
 +
|0
 +
|{{#expr:({{Did you know/Queue/Next}}-{{DYK queue/number of empty}}+6) mod 7 + 1}}
 +
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 10:28, 12 June 2020

6

Template documentation[view] [edit] [history] [purge]

Usage

This template calculates the next empty queue, by using the queue next to be loaded (6) and the number of empty queues (7) and then performing some modulo arithmetic.