Difference between revisions of "Template:Inflation"

From Emulation General Wiki
Jump to navigation Jump to search
(Created page with "<includeonly><abbr title="${{#iferror:{{#ifexpr:(({{{3}}} >= {{#switch:{{{1}}}|USD=1959}}) and ({{{3}}} <= {{{4|{{CURRENTYEAR}}}}}) and ({{{4|{{CURRENTYEAR}}}}} <= {{CURRENTYE...")
 
m (added category and clarified)
Line 63: Line 63:
 
}} <!-- End inflation tables -->
 
}} <!-- End inflation tables -->
 
) round {{{r|0}}}}}|[[NaN]]}}|[[NaN]]}} in {{CURRENTYEAR}} money">${{{2}}}</abbr></includeonly><noinclude>
 
) round {{{r|0}}}}}|[[NaN]]}}|[[NaN]]}} in {{CURRENTYEAR}} money">${{{2}}}</abbr></includeonly><noinclude>
Only USD is supported. Only 1959 and later is supported. Output rounded to the nearest dollar.
+
Displays a product's price as well as a server-side computation of an inflation-adjusted version in United States Dollars. The data is taken from [https://data.worldbank.org/indicator/fp.cpi.totl.zg the World Bank], and can only go as far back as 1959. The output is rounded to the nearest dollar.
  
 
Use: <code><nowiki>{{Inflation|Currency|Value|Year}}</nowiki></code>
 
Use: <code><nowiki>{{Inflation|Currency|Value|Year}}</nowiki></code>
Line 69: Line 69:
 
Example: $199 in 1991 <code><nowiki>{{Inflation|USD|199|1991}}</nowiki></code> = {{Inflation|USD|199|1991}}
 
Example: $199 in 1991 <code><nowiki>{{Inflation|USD|199|1991}}</nowiki></code> = {{Inflation|USD|199|1991}}
  
[https://data.worldbank.org/indicator/fp.cpi.totl.zg Inflation source]
+
[[Category:General wiki templates]]
 
</noinclude>
 
</noinclude>

Revision as of 22:20, 26 April 2019

Displays a product's price as well as a server-side computation of an inflation-adjusted version in United States Dollars. The data is taken from the World Bank, and can only go as far back as 1959. The output is rounded to the nearest dollar.

Use: {{Inflation|Currency|Value|Year}}

Example: $199 in 1991 {{Inflation|USD|199|1991}} = $199