Template:Inflation/doc: Difference between revisions

clean up
m (1 revision)
 
(clean up)
 
Line 8: Line 8:
  | __TOC__
  | __TOC__
  |}
  |}
This template takes a <tt>[[List of country codes|country_code]]</tt>, for example, "<tt>US</tt>" for the [[United States]] or "<tt>UK</tt>" for [[United Kingdom]], a <tt>value</tt> in that country's currency, a <tt>start_year</tt>, and applies to it the country's [[consumer price index|consumer price inflation]] until "recently" or another end year.<ref>How recently depends on how the data set for each country is constructed, and on the internal tables being updated accordingly every January. Some data tables provide inflation data up to December 31, {{#expr:{{CURRENTYEAR}}-1}}, others up to roughly June-July {{#expr:{{CURRENTYEAR}}-1}}, and others yet up to December 31, {{#expr:{{CURRENTYEAR}}-2}}.</ref> For example, this template calls the U.S. inflation table located in the sub-template [[Template:Inflation/US/dataset]] to perform the U.S. calculation. This means that whenever a new year arrives and the inflation tables are updated, all articles using this template have their displayed values updated accordingly.
This template takes a <tt>[[List of country codes|country_code]]</tt>, for example, "<tt>US</tt>" for the [[United States]] or "<tt>UK</tt>" for [[United Kingdom]], a <tt>value</tt> in that country's currency, a <tt>start_year</tt>, and applies to it the country's [[consumer price index|consumer price inflation]] until "recently" or another end year.<ref>How recently depends on how the data set for each country is constructed, and on the internal tables being updated accordingly every January. Some data tables provide inflation data up to December 31, {{#expr:{{CURRENTYEAR}}-1}}, others up to roughly June–July {{#expr:{{CURRENTYEAR}}-1}}, and others yet up to December 31, {{#expr:{{CURRENTYEAR}}-2}}.</ref> For example, this template calls the U.S. inflation table located in the sub-template [[Template:Inflation/US/dataset]] to perform the U.S. calculation. This means that whenever a new year arrives and the inflation tables are updated, all articles using this template have their displayed values updated accordingly.


Alternatively, you can provide a second, optional <tt>end_year</tt> parameter, and the value will be inflated for the period between the two years, providing a convenient way of getting values from different time periods adjusted around the same date.
Alternatively, you can provide a second, optional <tt>end_year</tt> parameter, and the value will be inflated for the period between the two years, providing a convenient way of getting values from different time periods adjusted around the same date.
14,061

edits