Template:USDCY/doc

This template will automatically show current-year US dollar figures for any historical value you put in.

Usage:.

Displays as: A bottle of Dr. Shart's Fundament Cleanser cost $6.66 in 1899 ($ in ).

The full code of the template is this:

(What this means is that, if the input amount is a buck or less, it uses formatprice with two decimal places, not one).

There are some limitations:
 * This only works for years that the inflation template has figures for.
 * This usually doesn't go up to the current year (for example, if you add the template in 2023, it might give figures for 2020 or something). This is not a bug; see Template:Inflation/year. It takes some amount of time for inflation figures to be calculated and made public. It will try to give the current year, but in practice, it will usually just get as close as possible.
 * This template is just a quick way to do a common task with other templates; if you need more specialized behavior, just take the bones out of this template and modify it to be appropriate.
 * will always be formatted the same way, as "($1234 in 2022)".
 * doesn't support doing anything weird with decimals, significant figures, or other input into the inflation templates (unless you can just pass it through with the two parameters in ).