3,970
edits
Luccagenes (talk | contribs) (added another level to switch function to allow for a two year gap between the current and revision dates) |
Luccagenes (talk | contribs) (simplified equations using different magic words) |
||
Line 11: | Line 11: | ||
{{#ifexpr:14> | {{#ifexpr:14> | ||
{{#switch: | {{#switch: | ||
{{#expr:{{ | {{#expr:{{CURRENTYEAR}} - {{REVISIONYEAR}}}} | ||
|0={{#expr:{{#time:z| | |0={{#expr:{{#time:z|{{CURRENTTIMESTAMP}}}}-{{#time:z|{{REVISIONTIMESTAMP}}}}}} | ||
|1={{#expr:365-{{#time:z| | |1={{#expr:365-{{#time:z|{{REVISIONTIMESTAMP}}}}+ | ||
{{#time:z| | {{#time:z|{{CURRENTTIMESTAMP}}}}}} | ||
|2={{#expr: | |2={{#expr:730-{{#time:z|{{REVISIONTIMESTAMP}}}}+ | ||
{{#time:z| | {{#time:z|{{CURRENTTIMESTAMP}}}}}}|error1}}|yes|no}} | ||
|error1}}|yes|no}} | |||
|yes=OKAY|no=Expired [[Category:Auto-outdated]]|error2}}'''</font></div> | |yes=OKAY|no=Expired [[Category:Auto-outdated]]|error2}}'''</font></div> | ||
|- | |- |
edits