Difference between revisions of "Template:Inflation/year/doc"
imported>Cherkash (added US-/UK-GDP) |
imported>Cherkash (added a warning about NGDPPC indexes) |
||
| Line 20: | Line 20: | ||
* {{tlx|Inflation-year|UK}} = {{Inflation-year|UK}} | * {{tlx|Inflation-year|UK}} = {{Inflation-year|UK}} | ||
** {{tlx|Inflation-year|UK-GDP}} = {{Inflation-year|UK-GDP}} | ** {{tlx|Inflation-year|UK-GDP}} = {{Inflation-year|UK-GDP}} | ||
| − | ** {{tlx|Inflation-year|UK-NGDPPC}} = {{Inflation-year|UK-NGDPPC}} | + | ** {{tlx|Inflation-year|UK-NGDPPC}} = {{Inflation-year|UK-NGDPPC}} (This should be eventually removed, as this is NOT an inflation index!) |
* {{tlx|Inflation-year|US}} = {{Inflation-year|US}} | * {{tlx|Inflation-year|US}} = {{Inflation-year|US}} | ||
** {{tlx|Inflation-year|US-GDP}} = {{Inflation-year|US-GDP}} | ** {{tlx|Inflation-year|US-GDP}} = {{Inflation-year|US-GDP}} | ||
| − | ** {{tlx|Inflation-year|US-NGDPPC}} = {{Inflation-year|US-NGDPPC}} | + | ** {{tlx|Inflation-year|US-NGDPPC}} = {{Inflation-year|US-NGDPPC}} (This should be eventually removed, as this is NOT an inflation index!) |
* {{tlx|Inflation-year|ZAR}} = {{Inflation-year|ZAR}} | * {{tlx|Inflation-year|ZAR}} = {{Inflation-year|ZAR}} | ||
| Line 44: | Line 44: | ||
], | ], | ||
"label": "Index", | "label": "Index", | ||
| − | "description": "An index code for one of several available inflation indexes. One of AU, AU-road, BD, CA, DE, IN, JP, PH, PK, UK, UK-GDP | + | "description": "An index code for one of several available inflation indexes. One of AU, AU-road, BD, CA, DE, IN, JP, PH, PK, UK, UK-GDP, US, US-GDP, ZAR.", |
"example": "US", | "example": "US", | ||
"type": "string", | "type": "string", | ||
Revision as of 02:54, 13 January 2018
| 40px | This is a documentation subpage for Template:Inflation/year. It contains usage information, categories and other content that is not part of the original template page. |
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}}= 2018{{Inflation-year|AU-road}}= 2018
{{Inflation-year|BD}}= 2014{{Inflation-year|CA}}= 2018{{Inflation-year|DE}}= 2017{{Inflation-year|IN}}= 2019{{Inflation-year|JP}}= 2019{{Inflation-year|PH}}= 2019{{Inflation-year|PK}}= 2018{{Inflation-year|UK}}= 2019{{Inflation-year|UK-GDP}}= 2016{{Inflation-year|UK-NGDPPC}}= Error: undefined index "UK-NGDPPC" when using {{Inflation/year}}. (This should be eventually removed, as this is NOT an inflation index!)
{{Inflation-year|US}}= 2019{{Inflation-year|US-GDP}}= 2019{{Inflation-year|US-NGDPPC}}= Error: undefined index "US-NGDPPC" when using {{Inflation/year}}. (This should be eventually removed, as this is NOT an inflation index!)
{{Inflation-year|ZAR}}= 2018
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}}.
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.
| 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, JP, PH, PK, UK, UK-GDP, US, US-GDP, ZAR.
| String | required |