Difference between revisions of "Template:Inflation/year"

From blackwiki
Jump to navigation Jump to search
blackwiki>Cabayi
blackwiki>MSGJ
(update AU, AU-road, PH, and ZAR per request)
Line 1: Line 1:
 
<includeonly>{{#switch:{{{index|{{{1|ERR}}}}}}
 
<includeonly>{{#switch:{{{index|{{{1|ERR}}}}}}
 
<!-- *** When changing this, also update the reference in [[Template:Inflation/fn]] and the datasets for [[Template:Inflation]]! *** -->
 
<!-- *** When changing this, also update the reference in [[Template:Inflation/fn]] and the datasets for [[Template:Inflation]]! *** -->
 +
| AU      = 2018
 +
| AU-road  = 2018
 
| AU      = 2010
 
| AU      = 2010
 
| AU-road  = 2013
 
| AU-road  = 2013
Line 9: Line 11:
 
| JP      = 2019
 
| JP      = 2019
 
| KRW      = 2017
 
| KRW      = 2017
| PH      = 2013
+
| PH      = 2019
 
| PK      = 2013
 
| PK      = 2013
 
| TEST    = 2012
 
| TEST    = 2012
 
| UK|GBP  = 2018
 
| UK|GBP  = 2018
| UKGDP|UK-GDP|UK-CAP   = 2016
+
| UKGDP
 +
| UK-GDP
 +
| UK-CAP   = 2016
 
| US|USD  = 2019
 
| US|USD  = 2019
| USGDP|US-GDP|US-CAP   = 2018
+
| USGDP
| ZAR         = 2016
+
| US-GDP
 +
| US-CAP   = 2018
 +
| ZAR     = 2018
 
| ERR      = <span class="error">Error: no index specified when using {{tl|Inflation/year}}.{{main other|[[Category:Pages with errors in inflation template]]}}</span>
 
| ERR      = <span class="error">Error: no index specified when using {{tl|Inflation/year}}.{{main other|[[Category:Pages with errors in inflation template]]}}</span>
 
|#default  = <span class="error">Error: undefined index "{{{index|{{{1}}}}}}" when using {{tl|Inflation/year}}.{{main other|[[Category:Pages with errors in inflation template]]}}</span>
 
|#default  = <span class="error">Error: undefined index "{{{index|{{{1}}}}}}" when using {{tl|Inflation/year}}.{{main other|[[Category:Pages with errors in inflation template]]}}</span>

Revision as of 22:47, 14 January 2020

50px Template documentation[view] [edit] [history] [purge]

Provides a standard way of indicating the "current" year of the inflated prices calculated by {{Inflation}}. This template is relied upon by {{Inflation}}, but can also be called directly in articles needing to specify the currently most recent year for which inflation is calculated for a given index. See {{Inflation}} for usage examples.

Usage

 {{Inflation/year|index}}

When the required index parameter is provided, the last year given by the inflation data is printed. The index codes are the same as those used by {{Inflation}}:

When no index parameter is provided, or when an invalid index is provided, an error is shown:


Provides a standard way of indicating the "current" year of the inflated prices calculated by the Inflation template. This template is relied upon by the Inflation template, but can also be called directly in articles needing to specify the currently most recent year for which inflation is calculated for a given index. See the Inflation template for usage examples.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Indexindex 1

An index code for one of several available inflation indexes. One of AU, AU-road, BD, CA, DE, IN, IR, JP, PH, PK, UK, UK-GDP, US, US-GDP, ZAR.

Example
US
Stringrequired