Template:International dollars/doc: Difference between revisions

From Sarkarverse
Jump to navigation Jump to search
m (1 revision)
 
(clean up)
 
Line 1: Line 1:
{{documentation subpage}}
{{documentation subpage}}
This template converts a value given in the national currency of a given country to [[Geary–Khamis dollar | international dollars]].
This template converts a value given in the national currency of a given country to [[Geary–Khamis dollar|international dollars]].


===Syntax===
===Syntax===
<nowiki>{{International dollars | {{{1}}} | {{{2}}} | year = {{{year}}} | round = {{{round}}} }}</nowiki><br/>
<nowiki>{{International dollars | {{{1}}} | {{{2}}} | year = {{{year}}} | round = {{{round}}} }}</nowiki>
*<nowiki>{{{1}}}</nowiki> is the value in the local currency to be converted.
*<nowiki>{{{1}}}</nowiki> is the value in the local currency to be converted.
*<nowiki>{{{2}}}</nowiki> is the country name or [[ISO 3166-1 alpha-3 | 3-letter ISO code]] for the country whose currency is being converted.
*<nowiki>{{{2}}}</nowiki> is the country name or [[ISO 3166-1 alpha-3|3-letter ISO code]] for the country whose currency is being converted.
*<nowiki>{{{year}}}</nowiki> is the year to use for the international dollar value, e.g. international dollars current in 2009.  The default is 2012.
*<nowiki>{{{year}}}</nowiki> is the year to use for the international dollar value, e.g. international dollars current in 2009.  The default is 2012.
*<nowiki>{{{round}}}</nowiki> is an optional parameter.  If it is equal to "yes", then the converted value is displayed to the nearest international dollar.
*<nowiki>{{{round}}}</nowiki> is an optional parameter.  If it is equal to "yes", then the converted value is displayed to the nearest international dollar.


===Examples===
===Examples===
*<nowiki>{{International dollars|100|Mexico}}</nowiki> displays {{International dollars|100|Mexico}}.  That is, 100 [[Mexican peso]]s had the same [[purchasing power]] as {{International dollars|100|MEX}} [[United States dollar | US dollars]] in 2012.
*<nowiki>{{International dollars|100|Mexico}}</nowiki> displays {{International dollars|100|Mexico}}.  That is, 100 [[Mexican peso]]s had the same [[purchasing power]] as {{International dollars|100|MEX}} [[United States dollar|US dollars]] in 2012.
*<nowiki>{{International dollars|100|MEX}}</nowiki> also displays {{International dollars|100|MEX}}.
*<nowiki>{{International dollars|100|MEX}}</nowiki> also displays {{International dollars|100|MEX}}.
*<nowiki>{{International dollars|100|MEX|round=yes}}</nowiki> displays {{International dollars|100|MEX|round=yes}}.
*<nowiki>{{International dollars|100|MEX|round=yes}}</nowiki> displays {{International dollars|100|MEX|round=yes}}.
*<nowiki>{{International dollars|100|MEX|year=2009}}</nowiki> displays {{International dollars|100|MEX|year=2009}}.  That is, 100 [[Mexican peso]]s had the same [[purchasing power]] as {{International dollars|100|MEX|year=2009}} [[United States dollar | US dollars]] in 2009.
*<nowiki>{{International dollars|100|MEX|year=2009}}</nowiki> displays {{International dollars|100|MEX|year=2009}}.  That is, 100 [[Mexican peso]]s had the same [[purchasing power]] as {{International dollars|100|MEX|year=2009}} [[United States dollar|US dollars]] in 2009.
*<nowiki>{{International dollars|100|MEX|year=1901}}</nowiki> displays {{International dollars|100|MEX|year=1901}} since data from 1901 has not yet been defined.
*<nowiki>{{International dollars|100|MEX|year=1901}}</nowiki> displays {{International dollars|100|MEX|year=1901}} since data from 1901 has not yet been defined.



Latest revision as of 22:31, 28 October 2013

This template converts a value given in the national currency of a given country to international dollars.

Syntax

{{International dollars | {{{1}}} | {{{2}}} | year = {{{year}}} | round = {{{round}}} }}

  • {{{1}}} is the value in the local currency to be converted.
  • {{{2}}} is the country name or 3-letter ISO code for the country whose currency is being converted.
  • {{{year}}} is the year to use for the international dollar value, e.g. international dollars current in 2009. The default is 2012.
  • {{{round}}} is an optional parameter. If it is equal to "yes", then the converted value is displayed to the nearest international dollar.

Examples

  • {{International dollars|100|Mexico}} displays 11.19. That is, 100 Mexican pesos had the same purchasing power as 11.19 US dollars in 2012.
  • {{International dollars|100|MEX}} also displays 11.19.
  • {{International dollars|100|MEX|round=yes}} displays 11.
  • {{International dollars|100|MEX|year=2009}} displays 12.3. That is, 100 Mexican pesos had the same purchasing power as 12.3 US dollars in 2009.
  • {{International dollars|100|MEX|year=1901}} displays Undefined year "1901" since data from 1901 has not yet been defined.

See also

  • Template:Inflation: Calculates a value in a given country in a given year based on an amount of currency in the same country in another year.
  • Template:toUSD: Converts a given currency to US dollars using exchange rates last updated (as of December 2012) in 2008.