Difference between revisions of "Template:BRL/doc"
Jump to navigation
Jump to search
imported>Giso6150 (improve cat) |
imported>Djr13 (copy documentation style from Template:US$) |
||
| Line 3: | Line 3: | ||
== Usage == | == Usage == | ||
| − | + | {{tlxi|R$|value}} | |
| − | + | Example: | |
| − | + | * {{tld|R$}} → {{R$}} | |
| − | + | * {{tld|R$|123.45}} → {{R$|123.45}} | |
| − | |||
| − | + | === Link === | |
| + | The parameter {{para|link|yes}} may be used to link R$ to the article [[Brazilian real]]. This is turned off by default, but may be appropriate for the first occurrence of the term in an article. | ||
| − | <nowiki>{{ | + | Example: |
| + | * {{tld|R$|123.45|3=link=yes}} → {{R$|123.45|link=yes}} | ||
| + | |||
| + | === Inflation calculation === | ||
| + | {{ToDo}}: This template can also calculate inflation, but only if reliably sourced inflation data is first added to [[Template:Inflation]].<!-- | ||
| + | |||
| + | ERASE TODO LINE AND UNCOMMENT THIS SECTION IF INFLATION DATA IS ADDED | ||
| + | |||
| + | {{ombox |type= content |imageright= [[File:Emblem-money.svg|42px]] |text= This template is <strong>only capable</strong> of inflating Consumer Price Index values: staples, workers' rent, small service bills (doctor's costs, train tickets). This template is <strong>incapable</strong> of inflating capital expenses, government expenses, or the personal wealth and expenditure of the rich. <strong>Incorrect use of this template would constitute original research. If you yourself do not have economic training, then please consult someone who does before using this template.</strong>}} | ||
| + | {{ombox |type= content |imageright= [[File:Current event warning.svg|42px]] |text= <strong>Do not assume that using this template will mean that a calculated value is <em>"current"</em></strong>, <em>"as of {{CURRENTYEAR}}"</em>, <em>"as of {{#expr:{{CURRENTYEAR}}-1}}"</em> or even necessarily <em>"recent"</em>. Do not use <code><nowiki>{{CURRENTYEAR}}</nowiki></code> to refer to calculated value, instead {{tlx|Inflation-year|BR}} may be used. See also [[MOS:REALTIME]].}} | ||
| + | |||
| + | The template supports inflation calculation, by way of {{tlx|Inflation}}. If the second parameter is used, to specify a year, and this year is within a certain range of available inflation data (specifically, {{nowrap|if {{Inflation/BR/startyear}} ≤ <code>{{var|year}}</code> < {{Inflation-year|BR}}}}), the equivalent value represented in {{Inflation-year|BR}} dollars will be calculated in parentheses. However, this function should only be used in appropriate situations. | ||
| + | |||
| + | * {{tlxi|R$|value|year}} | ||
| + | * {{tlx|R$|{{var|value}}|{{var|year}}|4=round={{var|round}}|5=about=yes}} | ||
| + | |||
| + | Examples: | ||
| + | * {{tld|R$|100|{{#expr:{{Inflation/BR/startyear}}-1}}}} → {{R$|100|{{#expr:{{Inflation/BR/startyear}}-1}}}} | ||
| + | * {{tld|R$|100|{{Inflation/BR/startyear}}}} → {{R$|100|{{Inflation/BR/startyear}}}} | ||
| + | * {{tld|R$|100|1966}} → {{R$|100|1966}} | ||
| + | * {{tld|R$|100|1966|4=link=yes}} → {{R$|100|1966|link=yes}} | ||
| + | * {{tld|R$|100|{{#expr:{{Inflation-year|BR}}-1}}}} → {{R$|100|{{#expr:{{Inflation-year|BR}}-1}}}} | ||
| + | * {{tld|R$|100|{{Inflation-year|BR}}}} → {{R$|100|{{Inflation-year|BR}}}} | ||
| + | * {{tld|R$|100|{{CURRENTYEAR}}}} → {{R$|100|{{CURRENTYEAR}}}} | ||
| + | * {{tld|R$|100|{{#expr:{{CURRENTYEAR}}+1}}}} → {{R$|100|{{#expr:{{CURRENTYEAR}}+1}}}} | ||
| + | |||
| + | Additional parameter {{para|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 {{para|round|{{var|integer}}}}. These parameters may be combined. | ||
| + | |||
| + | Examples: | ||
| + | * {{tld|R$|10|1935}} → {{R$|10|1935}} | ||
| + | * {{tld|R$|10|1935|4=round=0}} → {{R$|10|1935|round=0}} | ||
| + | * {{tld|R$|10|1935|4=about=yes}} → {{R$|10|1935|about=yes}} | ||
| + | * {{tld|R$|1000|1935|4=round=2}} → {{R$|1000|1935|round=2}} | ||
| + | * {{tld|R$|1000|1935|4=round=-2}} → {{R$|1000|1935|round=-2}} | ||
| + | * {{tld|R$|1000|1935|4=round=-2|5=about=yes}} → {{R$|1000|1935|round=-2|about=yes}} | ||
| + | |||
| + | --> | ||
| + | |||
| + | == Redirects here == | ||
| + | * [[Template:R$]] | ||
== See also == | == See also == | ||
* [[Wikipedia:Manual of Style (dates and numbers)#Currencies]] | * [[Wikipedia:Manual of Style (dates and numbers)#Currencies]] | ||
| + | * [[Template:AUD]] | ||
* [[Template:CAD]] | * [[Template:CAD]] | ||
* [[Template:US$]] | * [[Template:US$]] | ||
| Line 21: | Line 61: | ||
<includeonly> | <includeonly> | ||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
| − | {{DEFAULTSORT: | + | {{DEFAULTSORT:BRL}} |
[[Category:Brazil economic templates]] | [[Category:Brazil economic templates]] | ||
[[Category:Currency templates]] | [[Category:Currency templates]] | ||
[[Category:Currencies of Brazil|τ]] | [[Category:Currencies of Brazil|τ]] | ||
</includeonly> | </includeonly> | ||
Revision as of 12:40, 18 March 2016
| This is a documentation subpage for Template:BRL. It contains usage information, categories and other content that is not part of the original template page. |
Usage
{{R$|value}}
Example:
{{R$}}→ Template:R${{R$|123.45}}→ Template:R$
Link
The parameter |link=yes may be used to link R$ to the article Brazilian real. This is turned off by default, but may be appropriate for the first occurrence of the term in an article.
Example:
{{R$|123.45|link=yes}}→ Template:R$
Inflation calculation
Template:ToDo: This template can also calculate inflation, but only if reliably sourced inflation data is first added to Template:Inflation.
Redirects here
See also