Difference between revisions of "Template:BRL"

From blackwiki
Jump to navigation Jump to search
imported>Hack
(tweak wikilink)
imported>Djr13
(copy logic from Template:US$ as of revision 710153226, which has several improvements)
 
Line 1: Line 1:
<span style="white-space: nowrap"><includeonly>{{#ifeq:{{{link|no}}}
+
<span style="white-space: nowrap">{{#ifeq:{{{link|no}}}|yes
  |yes|[[Brazilian real|R$]]
+
  |[[Brazilian real|R$]]
  |R$}}{{#if:{{{1|}}}|{{formatnum:{{{1}}}}}}}</span>{{#if:{{{year|{{{2|}}}}}}
+
  |R$
|{{#ifexpr:{{{year|{{{2|}}}}}}<{{CURRENTYEAR}}
+
}}{{formatnum:{{{1|}}}}}</span><!--
  |{{#ifexpr:{{{year|{{{2|}}}}}}>1799
+
-->{{#ifeq:{{{year|{{{2|0}}}}}}|0||{{#ifexpr:{{Inflation/BR/startyear}}<={{{year|{{{2|0}}}}}} and {{{year|{{{2|0}}}}}}<{{Inflation-year|BR}}
  |&#32;({{#if:{{{about|}}}
+
|&#32;({{#if:{{{about|}}}
    |about ${{formatnum:{{Inflation|BR|{{formatnum: {{{1|}}}|R}}|{{{year|}}}{{{2|}}}|r={{{round|0}}}}}}}
+
  |equivalent to about ${{formatnum:{{Inflation|BR|{{formatnum:{{{1|}}}|R}}|{{{year|{{{2}}}}}}|r={{{round|0}}}}}}}
    |${{formatnum:{{Inflation|BR|{{formatnum:{{{1|}}}|R}}|{{{year|}}}{{{2|}}}|r={{{round|{{#ifexpr:{{Inflation|BR|{{formatnum:{{{1|}}}|R}}|{{{year|}}}{{{2|}}}}}>1000|0|2}}}}}}}}}
+
  |equivalent to ${{formatnum:{{Inflation|BR|{{formatnum:{{{1|}}}|R}}|{{{year|{{{2}}}}}}|r={{{round|{{#ifexpr:{{Inflation|BR|{{formatnum:{{{1|}}}|R}}|{{{year|{{{2}}}}}}}}>1000|0|2}}}}}}}}}
  }} in {{CURRENTYEAR}})
+
}} in {{Inflation-year|BR}})
  }}
+
}}}}<noinclude>
}}
+
{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! -->
}}</includeonly><noinclude>{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude>
+
</noinclude>

Latest revision as of 22:50, 17 March 2016

R$

Template documentation[view] [edit] [history] [purge]

Usage

{{R$|value}}

Example:

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:

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