Template:Inflation
{{#if:{{{value|{{{2|}}}}}}|0|1}}
or {{#if:{{{start_year|{{{3|}}}}}}|0|1}}
|Error when using {{tl|Inflation}}: {{Separated entries|separator=, |conjunction= and
|{{#if:{{{index|{{{1|}}}}}}||{{para|index}} (parameter 1)}}
|{{#if:{{{value|{{{2|}}}}}}||{{para|value}} (parameter 2)}}
|{{#if:{{{start_year|{{{3|}}}}}}||{{para|start_year}} (parameter 3)}}
}} must be specified.{{#if:{{{nocat|}}}||{{main other|Category:Pages with errors in inflation template}}}}|{{#ifexpr:
not(
{{#ifexist:Template:Inflation/{{{index|{{{1}}}}}}|1|0}}
and {{Isnumeric|{{Inflation/year|{{{index|{{{1}}}}}}}}|boolean=true}}
)
|Error when using {{tl|Inflation}}: {{para|index|{{{index|{{{1}}}}}}}} (parameter 1) not a recognized index.{{#if:{{{nocat|}}}||{{main other|Category:Pages with errors in inflation template}}}}|{{#ifexpr:
not(
{{Isnumeric|{{{value|{{{2}}}}}}|boolean=true}}
and {{Isnumeric|{{{start_year|{{{3}}}}}}|boolean=true}}
and {{#if: {{{end_year|{{{4|}}}}}} | {{Isnumeric|{{{end_year|{{{4}}}}}}|boolean=true}} | 1 }}
and {{#if: {{{r|}}} | {{Isnumeric|{{{r}}}|boolean=true}} | 1 }}
)
|Error when using {{tl|Inflation}}: NaN, check parameters for non-numeric data: {{Separated entries|separator=, |conjunction= and
|{{Ifnumber|{{formatnum:{{{value|{{{2}}}}}}|R}}||{{para|value|{{{value|{{{2}}}}}}}} (parameter 2)}}
|{{Ifnumber|{{formatnum:{{{start_year|{{{3}}}}}}|R}}||{{para|start_year|{{{start_year|{{{3}}}}}}}} (parameter 3)}}
|{{#if: {{{end_year|{{{4|}}}}}} | {{Ifnumber|{{formatnum:{{{end_year|{{{4}}}}}}|R}}||{{para|end_year|{{{end_year|{{{4}}}}}}}} (parameter 4)}} }}
|{{#if: {{{r|}}} | {{Ifnumber|{{formatnum:{{{r}}}|R}}||{{para|r|{{{r}}}}}}} }}
}}.{{#if:{{{nocat|}}}||{{main other|Category:Pages with errors in inflation template}}}}|{{#ifexpr:
not(
( {{{start_year|{{{3}}}}}} >= {{Inflation/{{{index|{{{1}}}}}}/startyear}} )
and(
( {{{start_year|{{{3}}}}}} <= {{{end_year|{{{4|{{Inflation/year|{{{index|{{{1}}}}}}}}}}}}}} )
or ( {{{start_year|{{{3}}}}}} = {{{end_year|{{{4|{{CURRENTYEAR}}}}}}}} )
)
and ( {{{end_year|{{{4|{{Inflation/year|{{{index|{{{1}}}}}}}}}}}}}} <= {{Inflation/year|{{{index|{{{1}}}}}}}} )
)
|Error when using {{tl|Inflation}}: {{Separated entries|separator=, |conjunction= and
|{{
#ifexpr: {{{start_year|{{{3}}}}}} < {{Inflation/{{{index|{{{1}}}}}}/startyear}}
|{{para|start_year|{{{start_year|{{{3}}}}}}}} (parameter 3) is lower than the earliest available year ({{Inflation/{{{index|{{{1}}}}}}/startyear}}) in index "{{{index|{{{1}}}}}}"}}
|{{
#ifexpr:
( {{{start_year|{{{3}}}}}} > {{{end_year|{{{4|{{Inflation/year|{{{index|{{{1}}}}}}}}}}}}}} )
and ( {{{start_year|{{{3}}}}}} != {{{end_year|{{{4|{{CURRENTYEAR}}}}}}}} )
|{{para|start_year|{{{start_year|{{{3}}}}}}}} (parameter 3) is greater than {{#if:{{{end_year|{{{4|}}}}}}|{{para|end_year|{{{end_year|{{{4}}}}}}}} (parameter 4)|the latest available year ({{Inflation/year|{{{index|{{{1}}}}}}}}) in index "{{{index|{{{1}}}}}}"}}}}
|{{
#ifexpr: {{{end_year|{{{4|{{Inflation/year|{{{index|{{{1}}}}}}}}}}}}}} > {{Inflation/year|{{{index|{{{1}}}}}}}}
|{{para|end_year|{{{end_year|{{{4}}}}}}}} (parameter 4) is greater than the latest available year ({{Inflation/year|{{{index|{{{1}}}}}}}}) in index "{{{index|{{{1}}}}}}"}}}}.{{#if:{{{nocat|}}}||{{main other|Category:Pages with errors in inflation template}}}}|{{#ifeq:{{{orig|}}}|yes|{{{cursign|$}}}{{{2}}} (}}{{#ifeq:{{{fmt|raw}}}|eq|equivalent to {{{cursign|$}}}}}{{formatnum:
{{
#iferror:
{{#invoke:Math|round|1={{
#expr:
{{formatnum:{{{value|{{{2}}}}}}|R}}
{{#ifeq:{{{start_year|{{{3}}}}}}|{{CURRENTYEAR}}
| * 1
| {{Inflation/{{{index|{{{1}}}}}}|{{{start_year|{{{3}}}}}}|{{{end_year|{{{4|{{Inflation/year|{{{index|{{{1}}}}}}}}}}}}}}}}
}}
round {{{r|0}}}
}}|2={{{r|0}}}}}
|Error when using {{tl|Inflation}}: NaN/calculation error, please notify Template talk:Inflation.{{main other|Category:Pages with errors in inflation template}}}}|{{#ifeq:{{{fmt|raw}}}|raw|R|}}}}{{#ifeq:{{{fmt|raw}}}|eq| in {{#ifeq:{{{start_year|{{{3}}}}}}|{{CURRENTYEAR}}|{{CURRENTYEAR}}|{{{end_year|{{{4|{{Inflation/year|{{{index|{{{1}}}}}}}}}}}}}}}}}}}}}}}}}}{{#ifeq:{{{orig|}}}|yes|)}}
{{Documentation}}