Predloga:US$

Iz Wikipedije, proste enciklopedije
Jump to navigation Jump to search
Documentation icon Dokumentacija predloge[predogled] [uredi] [zgodovina] [osveži]

This template adds the currency mark "US$" linked to the United States dollar article.

Usage[uredi kodo]

{{US$|value}} (value must be specified)

Example:

  • {{US$|123,45}} produces US$123,45

Inflation calculation[uredi kodo]

The template supports calculation of inflation. A second parameter can be used to specify a year from 1800 onwards and the relative value in 2020 will be calculated.

{{US$|value|year}}

Examples:

  • {{US$|10|1799}}US$10
  • {{US$|10|1800}}US$10 ($13.896 v 2020)
  • {{US$|10|2013}}US$10 ($1.012 v 2020)

A third parameter |about=yes will cause the template to calculate to the nearest dollar (instead of the nearest cent), and prefix the calculated value with "about". The rounding can be fine-tuned further by using |round=integer. These parameters may be combined.

Examples:

  • {{US$|10|1935}}US$10 ($17.201 v 2020)
  • {{US$|10|1935|about=yes}}US$10 (about $172 v 2020)
  • {{US$|10|1935|round=0}}US$10 ($172 v 2020)
  • {{US$|1000|1935|round=2}}US$1.000 ($1.720.146 v 2020)
  • {{US$|1000|1935|round=-2}}US$1.000 ($17.200 v 2020)
  • {{US$|1000|1935|round=-2|about=yes}}US$1.000 (about $17.200 v 2020)

Link[uredi kodo]

The parameter |link=yes may be used to link US$ to the article United States dollar. This is turned off by default, but may be appropriate for the first occurrence of the term in an article.

Example:

  • {{US$|10|1935|link=yes}}US$10 ($17.201 v 2020)

See also[uredi kodo]