ਸਮੱਗਰੀ 'ਤੇ ਜਾਓ

ਫਰਮਾ:To USD round/doc

ਵਿਕੀਪੀਡੀਆ, ਇੱਕ ਆਜ਼ਾਦ ਵਿਸ਼ਵਕੋਸ਼ ਤੋਂ

This template converts a value given in the national currency of a given country to a round US dollar figure. The intended use is for large round figures, when you don't want ਫਰਮਾ:Euro turning into US$ਗ਼ਲਤੀ:ਅਣਪਛਾਤਾ ਚਿੰਨ੍ਹ "["।, you just want a round figure like US$36,00,000. It tries to mimic the same number of significant figures, as are present in the original amount. The template uses values published by the IMF.[1]

{{To USD round|AMOUNT|COUNTRY|YEAR|sf=SIGFIG}}

Parameters

[ਸੋਧੋ]

There are three unnamed parameters, and one named parameter:

  • |1= is the amount in local currency to be converted to US dollars. Required.
  • |2= is the name or 3-letter ISO code of the country whose currency is being converted. Required.
  • |3= is the year to use for the US dollar exchange rate against the currency of the other country. Possible values: see § Data subtemplates below. Optional; default = 2019.
  • |sf= is number of significant figures. The converted value is displayed to that precision. Optional; the default is the number of significant figures in the amount given in param 1.

Examples

[ਸੋਧੋ]

  • {{To USD round|586000|BRA|year=2011}}Bad rounding hereFormatting error: invalid input when rounding
  • {{To USD round|586000|BRA|year=2019}} → 1,49,000
  • {{To USD round|586000|BRA|year=}} → 1,49,000
  • {{To USD round|586000|BRA}} → 1,49,000
  • {{To USD round|620000000|BRA|year=2015}}Bad rounding hereFormatting error: invalid input when rounding
  • {{To USD round|620000000|BRA|year=2015|sf=4}}Bad rounding hereFormatting error: invalid input when rounding
  • {{To USD round|640|MEX|sf=5}} → 33.220 # Some combos make no sense; USD doesn't have tenths of a cent.

See also

[ਸੋਧੋ]

Data subtemplates

[ਸੋਧੋ]

ਫਰਮਾ:Excerpt

References

[ਸੋਧੋ]
  1. "Official exchange rate (LCU per US$, period average)". Retrieved 14 April 2013.


TemplateData

[ਸੋਧੋ]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for Template:To USD round based on its TemplateData.

TemplateData for To USD round

Template to convert other currencies into United States dollars, by year, based on information from the International Monetary Fund, and with selected number of significant figures

ਫਰਮੇ ਦੇ ਮਾਪਦੰਡ

ਮਾਪਦੰਡਵੇਰਵਾਕਿਸਮਦਰਜਾ
amount1

value in foreign currency to convert to USD

Example
175000
Numberrequired
country code2 country

ISO 3166-1 alpha-3 country code

Example
MEX
Linerequired
yearyear

Year to convert currency. Values: 1960–2022.

ਮੂਲ ਰੂਪ
2019
Example
2002
Numberoptional
significant figuressf

If numeric, rounds to that many significant figures. If omitted, rounds to number of significant figures in 'amount'.

Example
3
Numberoptional