Template:Inflation/doc

Usage
This template calculate the inflation on the basis of several indices of inflation in data sets. The template uses a identification code to an index of inflation (usually a country code), a original value, the original  and, or well a reference to the specific   or by default the latest year end available in the currently, and calculates the equivalent value of historic economic changes between original and reference.

Apart from a convenient way to calculate the values of different periods of time specified, this template allows for a calculation periodically updated automatically from the value based on the most recent inflation data available. Every time you refresh the tables of inflation, what could be each year, all articles using this template will have their displayed values updated in consequence.

Countries supported are listed below, with their, and the periods of data available:

NOTE: (September 2019), are only enabled calculations for the u.s. dollar (US $) and pound sterling (UK £).

Parameters

 * country_code: The corresponding code for every country. (See codes in the table above), and see also "code country".


 * value: Numeric value representative of the inflation of the said country. "'NOTE:"' you can't take symbol money.


 * start_year: The start year to determine the inflation by country. NOTE: Depends on the amount of years allowed for each country. (See the years in the above table)


 * end_year: The year of completion for determine the inflation by country in a time range (in years). If provided, must be higher (more afternoon) that, but not more the current year (2016). If not provided, will by default the year's most "recent";


 * r=digit''': Sets the digit in which you must be rounded to the value, defaults to "0" if not specifies, that is to say, without cents.


 * fmt=c: insert commas in the value of inflation.


 * fmt=eq: show an equivalent sentence.


 * "'cursign=X"': will set the currency Symbol when using  (default: $).

Examples



 * US $595 ($ today) = USD $595 ($ currently)


 * US $595 = US $595













Enter parameters invalid produces a link to the article NaN:











Conversion currency
This template does not converts between different currencies. Therefore, if you want to know what they are worth today, the amount of £ 1,000 in 1960, entering would provide a result still in pounds and not in euros. In therefore, if you need a result in another currency, for now to do the conversion manually, as in the following example that uses the type-defined conversion from :

→

Rounding
By default, the values are calculated to the unit, but very low values (of single cents) are not desirable. You can specify the rounding with the. This parameter determines the number of decimal places. For obtaining the use of cents, indicate, but other values can be used, including the negative: , by example, rounded to the thousand more next; the million or so nearest, and so on. It is advisable to avoid excess of accuracy: even if the value of startup is known with accuracy, the result of the template does not it will be, because the index tables inflation are rarely an accuracy of more than approximately 1%, and used a long succession of years.

Results too long
Results very large are expressed in scientific notation ("1.2 E+14" in place of "120000000000000"), which usually is not desirable. A solution consists in expressing the value to calculate with fewer digits, adding text, and coefficient multiplier as "million" after the result, using the button "show preview" so many times as needed, changing parameters until the best result:






 * = $ thousands


 * = $ million


 * = $ trillion


 * = $ trillion

The following section provides a direct way to prevent this stage of trial and error.

Format of price
it is a template specifically designed to display price values, both big and small, so readable. For example, instead of displaying the whole of a great number as "953,783,409,856.12", what would as "", while small numbers have their share of cents appearing as expected, "1234.5" being properly shown as "".






 * = DM



Documentation
It is a good practice provide a valid reference for the prices calculated with this template in the articles where is used. The template country was developed to facilitate this task. Accepts as its only parameter the same country codes used here, and generate one or more footnotes, as appropriate. So overall, it looks like a piece of text that uses it:



As a result of this converted code (note the link from the note at the foot of the page at the end):


 * In 1985 a unit cost on average $ 1,040. This is.

The note at the foot thus generated appears whenever or   in the article, where the use of the template, usually in your "References" section. See below the live example in the document itself in the section References, or get click on the footnote generated above to access it.

Limitations

 * 1) Currently not it is possible to "deflate" an amount of money to what it would have been their equivalent value in a prior year. If you need this functionality, please ask in the talk page. Add it is not difficult, but not it makes sense to do it before someone really need to.


 * Substitution it is not compatible at all. Trying to  only would result in a long sequence of code analyzer built without any direct benefit. If you need to get a price deflated only once, use the special page ExpandTemplates, then copy the result and péguese in the desired location.