Template:Inflation/year
From Wikipedia, the free encyclopedia
This template is used on approximately 27,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
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}}
:
{{Inflation/year|AU}}
= 2022{{Inflation/year|AU-road}}
= 2018
{{Inflation/year|BD}}
= 2022{{Inflation/year|CA}}
= 2023{{Inflation/year|DE}}
= 2021{{Inflation/year|IN}}
= 2023{{Inflation/year|IR}}
= 1398{{Inflation/year|JP}}
= 2019{{Inflation/year|PH}}
= 2021{{Inflation/year|PK}}
= 2021{{Inflation/year|UK}}
= 2023{{Inflation/year|UK-GDP}}
= 2019
{{Inflation/year|US}}
= 2023{{Inflation/year|US-GDP}}
= 2023
{{Inflation/year|ZAR}}
= 2018{{Inflation/year|KRW}}
= 2017
When no index
parameter is provided, or when an invalid index is provided, an error is shown:
{{Inflation/year}}
= Error: no index specified when using {{Inflation/year}}.- also
{{Inflation/year|ERR}}
= Error: no index specified when using {{Inflation/year}}.
- also
{{Inflation/year|xyz}}
= Error: undefined index "xyz" when using {{Inflation/year}}.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Index | index 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.
| String | required |
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.