Changes

Jump to navigation Jump to search
m
no edit summary
<!-- Cases:
a) empty string -> {{error|}}
b) not a number -> {{error|}}
c) more than max -> max
d) less than min -> min
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
|{{#if: {{{1|}}} |0|1}} = {{{error|}}}
|{{IfNum| {{#expr:{{{1}}} }} |0|1}} = {{{error|}}}
|{{#expr: {{CURRENTYEAR}}-({{{1}}}) >= {{{max|{{CURRENTYEAR}} }}} }} = {{{max|{{CURRENTYEAR}} }}}
|{{#expr: {{CURRENTYEAR}}-({{{1}}}) <= {{{min|0}}} }} = {{{min|0}}}
|#default = {{#expr: trunc( ({{CURRENTYEAR}}-({{{1}}})) / {{{mod|1}}}) * {{{mod|1}}} }}
}}<noinclude>
{{heavily used template}}
{{Documentation}}
</noinclude>
Anonymous user

Navigation menu