Template:Years since: Difference between revisions
Template page
More actions
m Protected Template:Years since: widely used template ([edit=sysop] (indefinite) [move=sysop] (indefinite)) |
Fulfilling edit request by Riley Huntley. Thanks for helping! |
||
| Line 1: | Line 1: | ||
<!-- Cases: | <noinclude>{{heavily used template}}</noinclude><!-- Cases: | ||
a) empty string -> {{error|}} | a) empty string -> {{error|}} | ||
b) not a number -> {{error|}} | b) not a number -> {{error|}} | ||
c) more than max -> max | c) more than max -> max | ||
d) less than min -> min | d) less than min -> min | ||
e) number | e) number in between min and max. {{#expr: trunc( ({{CURRENTYEAR}}-{{{1}}}) / {{{mod|1}}}) * {{{mod|1}}} }} calculates number of years since {{{1}}} rounded down to a multiple of mod | ||
-->{{#switch:1 | -->{{#switch:1 | ||
|{{#if: {{{1|}}} |0|1}} = {{{error|}}} | |{{#if: {{{1|}}} |0|1}} = {{{error|}}} | ||