Template:Auto-outdated: Difference between revisions

fixed equation (replaced a constant with "parameter 1") and added calculation values to documentation.
m (fix)
(fixed equation (replaced a constant with "parameter 1") and added calculation values to documentation.)
Line 8: Line 8:
| width="220" nowrap="nowrap" align="center" | '''Auto-outdated''' ( Setpoint''': {{#if:{{{1|}}}|{{{1}}}|7}}''' days )<br>
| width="220" nowrap="nowrap" align="center" | '''Auto-outdated''' ( Setpoint''': {{#if:{{{1|}}}|{{{1}}}|7}}''' days )<br>
|-
|-
| nowrap="nowrap" align="center" | <font color="maroon"></font><div style="font-size:11px"><font color="maroon">'''Current alert status:&nbsp;&nbsp;'''</font>'''<font color="red"></font>'''<font color="red">'''{{#switch:{{#ifexpr:14>{{#switch:
| nowrap="nowrap" align="center" | <font color="maroon"></font><div style="font-size:11px"><font color="maroon">'''Current alert status:&nbsp;&nbsp;'''</font>'''<font color="red"></font>'''<font color="red">'''{{#switch:{{#ifexpr:{{#if:{{{1|}}}|{{{1}}}|7}}>{{#switch:
{{#expr:{{CURRENTYEAR}} - {{REVISIONYEAR}}}}
{{#expr:{{CURRENTYEAR}} - {{REVISIONYEAR}}}}
|0={{#expr:{{#time:z|{{CURRENTTIMESTAMP}}}}-{{#time:z|{{REVISIONTIMESTAMP}}}}}}
|0={{#expr:{{#time:z|{{CURRENTTIMESTAMP}}}}-{{#time:z|{{REVISIONTIMESTAMP}}}}}}
Line 24: Line 24:


<div style="clear:both"></div>
<div style="clear:both"></div>
<br>
<br><br>
<br>
<br><br>
'''Calculated equation values:'''<br><br>
'''{{#if:{{{1|}}}|{{{1}}}|7}}''' Set point (template parameter 1)<br>
'''{{#time:z|{{CURRENTTIMESTAMP}}}}'''&nbsp;&nbsp;Current - day of year<br>
'''{{#time:z|{{REVISIONTIMESTAMP}}}}'''&nbsp;&nbsp;Revision - day of year<br>
'''{{#expr:{{#time:z|{{CURRENTTIMESTAMP}}}}-{{#time:z|{{REVISIONTIMESTAMP}}}}}}'''&nbsp;&nbsp;Option 1: Current Year days minus Revision Year days<br>
'''{{#expr:365-{{#time:z|{{REVISIONTIMESTAMP}}}}+
{{#time:z|{{CURRENTTIMESTAMP}}}}}}'''&nbsp;&nbsp;Option 2: Revision days (from end of year) plus Current Year days<br>
'''{{#expr:730-{{#time:z|{{REVISIONTIMESTAMP}}}}+
{{#time:z|{{CURRENTTIMESTAMP}}}}}}'''&nbsp;&nbsp;Option 3: Revision days (from end of year) plus 365 plus Current Year days<br>
 
<br>
<br>
<br>
<br>
3,970

edits