Templat:Inflasi: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
baru |
update |
||
Baris 1:
{{
#switch: {{padleft:|1|{{{2|8}}}x|}}
|0|1|2|3|4|5|6|7|8|9 =
| #default =
<br><span class="error">{Inflation} - Amount must not have <!--
-->"{{padleft:|1|{{{2|$8}}}x|}}" prefix:</span><!--
--> {{{2|$8}}}.
}}{{
#ifexpr: ({{{3|2012}}}) < ({{Inflation/{{{1|US}}}/startyear}})
|<br><span class="error">{Inflation} - Year: </span>{{{3}}}<!--
--> <span class="error">lower than<!--
--> {{{1|US}}} minimum, {{Inflation/{{{1|US}}}/startyear}},<!--
--> for amount:</span> {{{2|8}}}.
}}{{
#ifexpr: ({{{3|2012}}}) > ({{{4|{{CURRENTYEAR}} }}})
|<br><span class="error">{Inflation} - Start year: {{{3}}}<!--
--> greater than end year, {{{4|{{CURRENTYEAR}} }}}<!--
--> for amount:</span> {{{2|8}}}.
}}{{
#ifexpr: ({{{4|{{CURRENTYEAR}} }}}) > {{CURRENTYEAR}}
|<br><span class="error">{Inflation} - End year: </b>{{{4}}}<b><!--
--> greater than current year, {{CURRENTYEAR}}<!--
--> for amount:</span> {{{2|8}}}.
}}{{#ifeq:{{{fmt|raw}}}|eq
|equivalent to {{{cursign|$}}}
}}{{formatnum:{{
#iferror:{{
#ifexpr:({{{3|2012}}})>=({{Inflation/{{{1|US}}}/startyear}})
and ({{{3|2012}}}) <= ({{{4|{{CURRENTYEAR}}}}})
and ({{{4|{{CURRENTYEAR}}}}}) <= {{CURRENTYEAR}}
|<!--then decomma & calculate-->{{
#expr:( {{formatnum:{{{2|8,000}}}|R}} )
{{Inflation/{{{1|US}}}|{{{3|1980}}}|{{{4|{{CURRENTYEAR}}}}}}}
round ({{{r|0}}}) }}
|[[NaN]]
}}
|{Inflation} - [[NaN]], check amount: {{{2}}} or year: {{{3}}}.
}}|{{
#ifeq:{{{fmt|raw}}}|raw|R|}}
}}{{#ifeq:{{{fmt|raw}}}|eq
| in {{{4|{{CURRENTYEAR}}|}}}
}}<noinclude>
{{Documentation}}</noinclude>
|