Difference between revisions of "Template:GBP"
imported>Ryulong |
imported>Greenrd (Per manual of style, "The pound sterling is represented by the £ symbol, with one horizontal bar.") |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{Nowrap|{{#ifeq:{{{link}}}|yes|[[Pound sterling| | + | <includeonly>{{Nowrap|{{#ifeq:{{{link}}}|yes|[[Pound sterling|£]]|£}}{{formatnum:{{{1|}}}}}}}</includeonly><noinclude>{{Documentation}}<!-- place category on the /doc subpage, not here --></noinclude> |
Revision as of 11:58, 10 April 2015
This is a multifunction template. At its simplest, it adds the currency mark "£", as recommended by MOS:CURRENCY for many situations. The template can also link to the Pound sterling article and can even calculate inflation. See warnings below.
Usage
{{GBP|value}}
Example:
{{GBP}}→ £{{GBP|123.45}}→ £123.45
Link
The parameter |link=yes may be used to link to the article Pound sterling. This is turned off by default, but may be appropriate for the first occurrence of the term in an article.
Example:
{{GBP|123.45|link=yes}}→ £123.45
Suppress "GB"
By specifying |long=no, display of "GB" before the "£" sign may be suppressed when it is clear from context that the Pound Sterling is meant, rather than other currencies that use £ the symbol.
Example:
{{GBP|123.45|long=no}}→ £123.45
Inflation calculation
Do not assume that using this template will mean that a calculated value is "current", "as of 2026", "as of 2025" or even necessarily "recent". Do not use {{CURRENTYEAR}} to refer to calculated value, instead {{Inflation/year|UK}} may be used. See also MOS:REALTIME. | 42px |
The template supports inflation calculation, by way of {{Inflation}}. If the second parameter is used, to specify a year, and this year is within a certain range of available inflation data (specifically, if 1209 ≤ year < 2019), the equivalent value represented in 2019 pound will be calculated in parentheses. However, this function should only be used in appropriate situations.
Examples:
{{GBP|100|1208}}→ £100{{GBP|100|1209}}→ £100{{GBP|100|1966}}→ £100{{GBP|100|1966|link=yes}}→ £100{{GBP|100|2018}}→ £100{{GBP|100|2019}}→ £100{{GBP|100|2026}}→ £100{{GBP|100|2027}}→ £100
Additional parameter |about=yes will cause the template to calculate to the nearest pound (instead of the nearest penny), and prefix the calculated value with "about". The rounding can be fine-tuned further by using |round=integer. These parameters may be combined.
Examples:
{{GBP|10|1990}}→ £10{{GBP|10|1990|round=0}}→ £10{{GBP|10|1990|about=yes}}→ £10{{GBP|1000|1990|round=2}}→ £1,000{{GBP|1000|1990|round=-2}}→ £1,000{{GBP|1000|1990|round=-2|about=yes}}→ £1,000
Redirects here
See also
- Wikipedia:Manual of Style (dates and numbers)#Currencies
- Template:Currency
- Wikipedia:Wikiproject United Kingdom
- Template:Pounds, shillings, and pence
- Template:AUD
- Template:BDT
- Template:CAD
- Template:CNY
- Template:INR
- Template:JPY
- Template:Philippine peso
- Template:PKR
- Template:US$
| The above documentation is transcluded from Template:GBP/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |