Template:From USD
This template uses Lua: |
This template converts a value given in US dollars to the national currency of a given country.
Syntax
{{From USD | {{{1}}} | {{{2}}} | year = {{{year}}} | round = {{{round}}} | r = {{{r}}} | cur = {{{cur}}} | series = {{{series}}} }}
- {{{1}}} and {{{2}}} are the template positional parameters (this is, the first and the second parameters in the template).
- {{{1}}} is the value in US dollars to be converted.
- {{{2}}} is the country name or 3-letter ISO code for the country whose currency is being converted to.
- {{{year}}} is the year to use for the US dollar value, e.g. US dollars current in 2009. The default is currently 2019.
- {{{round}}} is an optional parameter. If it is equal to "yes", then the converted value is displayed to the nearest integer. The default is rounding to the nearest cent.
- {{{r}}} is an optional parameter. It sets the digits to which the result must be rounded. A positive value indicates a fractional digit including trailing zeros. Defaults to
2
. - {{{cur}}} is an optional parameter. It allows to select the currency for the target country. Currently only supported for the Euro and the currencies that have been immediately replaced by the Euro.
Examples
{{From USD|100|USA}}
displays 100. Trivial US dollar conversions work.{{From USD|100|FRA}}
displays 84.55. Defaults to Euro{{From USD|100|FRA|cur=}}
displays 84.55. Still defaults to Euro{{From USD|100|FRA|cur=EUR}}
displays 84.55. Redundant.{{From USD|100|FRA|cur=FRF}}
displays 554.63. That is, 100 US dollars is worth 554.63 French Francs.{{From USD|100|FRA|cur=FRF|year=}}
also displays 554.63. They would exchange to 554.63 French Francs according to the latest year for which some country has data, but for a Eurozone country the rate is fixed anyway.{{From USD|100|FRA|cur=FRF|r=1}}
displays 554.6. Decrease the precision.{{From USD|100|FRA|cur=FRF|r=0}}
displays 555. Do not show any decimals.{{From USD|100|FRA|cur=FRF|round=yes}}
also displays 555.{{From USD|0.01|FRA|cur=FRF}}
displays 0.06. By default, the converted value has up to 2 decimals.{{From USD|0.01|FRA|cur=FRF|r=5}}
displays 0.05546. Increase the precision to 5 decimals.{{Formatnum:{{From USD|100000|USA}}}}
displays 100,000.{{From USD|100|TWN|year=1960}}
displays Unknown country code for year 1960: TWN since Taiwanese data for 1960 has not yet been entered.{{From USD|100|MEX|year=1959}}
displays Undefined year "1959" since data for 1959 has not been defined.{{From USD|100|MEX|year=2021}}
displays 2027 since the data for 2021 has not been entered yet.
{{From USD|1|FRA|year=1971|r=15}}
displays 5.5088280206065{{From USD|1|FRA|cur=FRF|year=1971|r=15}}
displays 5.5088280206065{{From USD|1|FRA|cur=FRF|year=1999|r=15}}
displays 6.154597485443
{{From USD|{{From EUR|1|USA|year=1971|r=15}}|EUR|year=1971|r=15}}
displays 1.0000000000001{{From USD|{{From EUR|1|USA|year=1972|r=15}}|EUR|year=1972|r=15}}
displays 1.0000000000002{{From USD|{{From EUR|1|USA|year=1973|r=15}}|EUR|year=1973|r=15}}
displays 1{{From USD|{{From EUR|1|USA|year=1974|r=15}}|EUR|year=1974|r=15}}
displays 1.0000000000001{{From USD|{{From EUR|1|USA|year=1975|r=15}}|EUR|year=1975|r=15}}
displays 1.0000000000006{{From USD|{{From EUR|1|USA|year=1976|r=15}}|EUR|year=1976|r=15}}
displays 1.0000000000005{{From USD|{{From EUR|1|USA|year=1977|r=15}}|EUR|year=1977|r=15}}
displays 1.0000000000001{{From USD|{{From EUR|1|USA|year=1978|r=15}}|EUR|year=1978|r=15}}
displays 1.0000000000002{{From USD|{{From EUR|1|USA|year=1979|r=15}}|EUR|year=1979|r=15}}
displays 0.99999999999985{{From USD|{{From EUR|1|USA|year=1980|r=15}}|EUR|year=1980|r=15}}
displays 0.9999999999995{{From USD|{{From EUR|1|USA|year=1981|r=15}}|EUR|year=1981|r=15}}
displays 0.99999999999964{{From USD|{{From EUR|1|USA|year=1982|r=15}}|EUR|year=1982|r=15}}
displays 0.99999999999991{{From USD|{{From EUR|1|USA|year=1983|r=15}}|EUR|year=1983|r=15}}
displays 1.0000000000002{{From USD|{{From EUR|1|USA|year=1984|r=15}}|EUR|year=1984|r=15}}
displays 1.0000000000003{{From USD|{{From EUR|1|USA|year=1985|r=15}}|EUR|year=1985|r=15}}
displays 0.99999999999966{{From USD|{{From EUR|1|USA|year=1986|r=15}}|EUR|year=1986|r=15}}
displays 0.9999999999996{{From USD|{{From EUR|1|USA|year=1987|r=15}}|EUR|year=1987|r=15}}
displays 0.99999999999983{{From USD|{{From EUR|1|USA|year=1988|r=15}}|EUR|year=1988|r=15}}
displays 1{{From USD|{{From EUR|1|USA|year=1989|r=15}}|EUR|year=1989|r=15}}
displays 0.99999999999945{{From USD|{{From EUR|1|USA|year=1990|r=15}}|EUR|year=1990|r=15}}
displays 0.99999999999976{{From USD|{{From EUR|1|USA|year=1991|r=15}}|EUR|year=1991|r=15}}
displays 0.99999999999992{{From USD|{{From EUR|1|USA|year=1992|r=15}}|EUR|year=1992|r=15}}
displays 0.99999999999946{{From USD|{{From EUR|1|USA|year=1993|r=15}}|EUR|year=1993|r=15}}
displays 1.0000000000003{{From USD|{{From EUR|1|USA|year=1994|r=15}}|EUR|year=1994|r=15}}
displays 0.99999999999941{{From USD|{{From EUR|1|USA|year=1995|r=15}}|EUR|year=1995|r=15}}
displays 0.99999999999969{{From USD|{{From EUR|1|USA|year=1996|r=15}}|EUR|year=1996|r=15}}
displays 0.99999999999953{{From USD|{{From EUR|1|USA|year=1997|r=15}}|EUR|year=1997|r=15}}
displays 0.99999999999947{{From USD|{{From EUR|1|USA|year=1998|r=15}}|EUR|year=1998|r=15}}
displays 0.99999999999991{{From USD|{{From EUR|1|USA|year=1999|r=15}}|EUR|year=1999|r=15}}
displays 0.99999999999972{{From USD|{{From EUR|1|USA|year=2000|r=15}}|EUR|year=2000|r=15}}
displays 0.99999999999982{{From USD|{{From EUR|1|USA|year=2001|r=15}}|EUR|year=2001|r=15}}
displays 0.99999999999962{{From USD|{{From EUR|1|USA|year=2002|r=15}}|EUR|year=2002|r=15}}
displays 1.0000000000001{{From USD|{{From EUR|1|USA|year=2003|r=15}}|EUR|year=2003|r=15}}
displays 0.99999999999991{{From USD|{{From EUR|1|USA|year=2004|r=15}}|EUR|year=2004|r=15}}
displays 1.0000000000004{{From USD|{{From EUR|1|USA|year=2005|r=15}}|EUR|year=2005|r=15}}
displays 1.0000000000002{{From USD|{{From EUR|1|USA|year=2006|r=15}}|EUR|year=2006|r=15}}
displays 0.99999999999936{{From USD|{{From EUR|1|USA|year=2007|r=15}}|EUR|year=2007|r=15}}
displays 0.99999999999985{{From USD|{{From EUR|1|USA|year=2008|r=15}}|EUR|year=2008|r=15}}
displays 1.0000000000007{{From USD|{{From EUR|1|USA|year=2009|r=15}}|EUR|year=2009|r=15}}
displays 1.0000000000006{{From USD|{{From EUR|1|USA|year=2010|r=15}}|EUR|year=2010|r=15}}
displays 1.0000000000005{{From USD|{{From EUR|1|USA|year=2011|r=15}}|EUR|year=2011|r=15}}
displays 0.99999999999957{{From USD|{{From EUR|1|USA|year=2012|r=15}}|EUR|year=2012|r=15}}
displays 1.0000000000004{{From USD|{{From EUR|1|USA|year=2013|r=15}}|EUR|year=2013|r=15}}
displays 0.9999999999997{{From USD|{{From EUR|1|USA|year=2014|r=15}}|EUR|year=2014|r=15}}
displays 0.99999999999977{{From USD|{{From EUR|1|USA|year=2015|r=15}}|EUR|year=2015|r=15}}
displays 0.99999999999973{{From USD|{{From EUR|1|USA|year=2016|r=15}}|EUR|year=2016|r=15}}
displays 1.0000000000004{{From USD|{{From EUR|1|USA|year=2017|r=15}}|EUR|year=2017|r=15}}
displays 1.0000000000005{{From USD|{{From EUR|1|USA|year=2018|r=15}}|EUR|year=2018|r=15}}
displays 1.0000000000005{{From USD|{{From EUR|1|USA|year=2019|r=15}}|EUR|year=2019|r=15}}
displays 1.0000000000005{{From USD|{{From EUR|1|USA|year=2020|r=15}}|EUR|year=2020|r=15}}
displays 1.0000000000003
{{To USD|{{To EUR|{{From USD|1|IND|year=1999|r=4}}|IND|year=1999|r=4}}|EUR|year=1999|r=4}}
displays 0.9975{{To USD|{{To EUR|{{From USD|1|IND|year=2000|r=4}}|IND|year=2000|r=4}}|EUR|year=2000|r=4}}
displays 1.0004{{To USD|{{To EUR|{{From USD|1|IND|year=2001|r=4}}|IND|year=2001|r=4}}|EUR|year=2001|r=4}}
displays 0.9993{{To USD|{{To EUR|{{From USD|1|IND|year=2002|r=4}}|IND|year=2002|r=4}}|EUR|year=2002|r=4}}
displays 1.0015{{To USD|{{To EUR|{{From USD|1|IND|year=2003|r=4}}|IND|year=2003|r=4}}|EUR|year=2003|r=4}}
displays 1.0007{{To USD|{{To EUR|{{From USD|1|IND|year=2004|r=4}}|IND|year=2004|r=4}}|EUR|year=2004|r=4}}
displays 1.0007{{To USD|{{To EUR|{{From USD|1|IND|year=2005|r=4}}|IND|year=2005|r=4}}|EUR|year=2005|r=4}}
displays 0.9994{{To USD|{{To EUR|{{From USD|1|IND|year=2006|r=4}}|IND|year=2006|r=4}}|EUR|year=2006|r=4}}
displays 0.9993{{To USD|{{To EUR|{{From USD|1|IND|year=2007|r=4}}|IND|year=2007|r=4}}|EUR|year=2007|r=4}}
displays 1.0012{{To USD|{{To EUR|{{From USD|1|IND|year=2008|r=4}}|IND|year=2008|r=4}}|EUR|year=2008|r=4}}
displays 1.0038{{To USD|{{To EUR|{{From USD|1|IND|year=2009|r=4}}|IND|year=2009|r=4}}|EUR|year=2009|r=4}}
displays 1.0019{{To USD|{{To EUR|{{From USD|1|IND|year=2010|r=4}}|IND|year=2010|r=4}}|EUR|year=2010|r=4}}
displays 0.9992{{To USD|{{To EUR|{{From USD|1|IND|year=2011|r=4}}|IND|year=2011|r=4}}|EUR|year=2011|r=4}}
displays 1.0014{{To USD|{{To EUR|{{From USD|1|IND|year=2012|r=4}}|IND|year=2012|r=4}}|EUR|year=2012|r=4}}
displays 0.9997{{To USD|{{To EUR|{{From USD|1|IND|year=2013|r=4}}|IND|year=2013|r=4}}|EUR|year=2013|r=4}}
displays 0.999{{To USD|{{To EUR|{{From USD|1|IND|year=2014|r=4}}|IND|year=2014|r=4}}|EUR|year=2014|r=4}}
displays 0.9996{{To USD|{{To EUR|{{From USD|1|IND|year=2015|r=4}}|IND|year=2015|r=4}}|EUR|year=2015|r=4}}
displays 0.9991{{To USD|{{To EUR|{{From USD|1|IND|year=2016|r=4}}|IND|year=2016|r=4}}|EUR|year=2016|r=4}}
displays 1.0001{{To USD|{{To EUR|{{From USD|1|IND|year=2017|r=4}}|IND|year=2017|r=4}}|EUR|year=2017|r=4}}
displays 1.0008{{To USD|{{To EUR|{{From USD|1|IND|year=2018|r=4}}|IND|year=2018|r=4}}|EUR|year=2018|r=4}}
displays 1.0007{{To USD|{{To EUR|{{From USD|1|IND|year=2019|r=4}}|IND|year=2019|r=4}}|EUR|year=2019|r=4}}
displays 0.9998
{{To USD|{{To EUR|{{From USD|1|CHN|year=2001|r=4}}|CHN|year=2001|r=4}}|EUR|year=2001|r=4}}
displays 1{{To USD|{{To EUR|{{From USD|1|CHN|year=2002|r=4}}|CHN|year=2002|r=4}}|EUR|year=2002|r=4}}
displays 1.0001{{To USD|{{To EUR|{{From USD|1|CHN|year=2003|r=4}}|CHN|year=2003|r=4}}|EUR|year=2003|r=4}}
displays 1{{To USD|{{To EUR|{{From USD|1|CHN|year=2004|r=4}}|CHN|year=2004|r=4}}|EUR|year=2004|r=4}}
displays 0.9998{{To USD|{{To EUR|{{From USD|1|CHN|year=2005|r=4}}|CHN|year=2005|r=4}}|EUR|year=2005|r=4}}
displays 0.9999{{To USD|{{To EUR|{{From USD|1|CHN|year=2006|r=4}}|CHN|year=2006|r=4}}|EUR|year=2006|r=4}}
displays 1.0002{{To USD|{{To EUR|{{From USD|1|CHN|year=2007|r=4}}|CHN|year=2007|r=4}}|EUR|year=2007|r=4}}
displays 1.0007{{To USD|{{To EUR|{{From USD|1|CHN|year=2008|r=4}}|CHN|year=2008|r=4}}|EUR|year=2008|r=4}}
displays 0.9997{{To USD|{{To EUR|{{From USD|1|CHN|year=2009|r=4}}|CHN|year=2009|r=4}}|EUR|year=2009|r=4}}
displays 1.0001{{To USD|{{To EUR|{{From USD|1|CHN|year=2010|r=4}}|CHN|year=2010|r=4}}|EUR|year=2010|r=4}}
displays 1.0005{{To USD|{{To EUR|{{From USD|1|CHN|year=2011|r=4}}|CHN|year=2011|r=4}}|EUR|year=2011|r=4}}
displays 0.9999{{To USD|{{To EUR|{{From USD|1|CHN|year=2012|r=4}}|CHN|year=2012|r=4}}|EUR|year=2012|r=4}}
displays 1.0006{{To USD|{{To EUR|{{From USD|1|CHN|year=2013|r=4}}|CHN|year=2013|r=4}}|EUR|year=2013|r=4}}
displays 1.0079{{To USD|{{To EUR|{{From USD|1|CHN|year=2014|r=4}}|CHN|year=2014|r=4}}|EUR|year=2014|r=4}}
displays 0.997{{To USD|{{To EUR|{{From USD|1|CHN|year=2015|r=4}}|CHN|year=2015|r=4}}|EUR|year=2015|r=4}}
displays 0.9908{{To USD|{{To EUR|{{From USD|1|CHN|year=2016|r=4}}|CHN|year=2016|r=4}}|EUR|year=2016|r=4}}
displays 1.0003{{To USD|{{To EUR|{{From USD|1|CHN|year=2017|r=4}}|CHN|year=2017|r=4}}|EUR|year=2017|r=4}}
displays 1.0008{{To USD|{{To EUR|{{From USD|1|CHN|year=2018|r=4}}|CHN|year=2018|r=4}}|EUR|year=2018|r=4}}
displays 1.0007{{To USD|{{To EUR|{{From USD|1|CHN|year=2019|r=4}}|CHN|year=2019|r=4}}|EUR|year=2019|r=4}}
displays 0.9998
See also
- {{To USD}} is leveraged by {{From USD}}
{{formatnum:}}
- {{To USD round}}
- {{Inflation}}
- {{International dollars}}
- {{From USD}}
- {{To EUR}}
- {{From EUR}}
- {{FXConvert}}
- {{INRConvert}}
- {{Per capita}}
References
TemplateData
TemplateData for From USD
<templatedata> { "params": { "1": { "label": "Amount", "description": "value in US dollars to convert to other currency", "example": "22816", "type": "number", "required": true }, "2": { "aliases": [ "country" ], "label": "Country code", "description": "ISO 3166-1 alpha-3 country code", "example": "FRA", "type": "line", "required": true }, "year": { "description": "Year to convert currency", "example": "2002", "type": "number", "required": true }, "round": { "label": "Round to nearest integer?", "description": "If 'yes', rounds to nearest whole amount. If omitted, rounds to nearest cent.", "example": "yes", "type": "string" },
"r": {
"label": "Resolution", "description": "The number of digits of precision in the result value.", "example": "3", "type": "number" },
"cur": {
"label": "Currency code", "description": "It allows to select the currency for the country. Currently only supported for the Euro and the currencies that have been immediately replaced by the Euro.", "example": "FRF, EUR", "type": "line" } }, "description": "Template to convert US dollars into other currencies, by year" } </templatedata>