Template:JPYConvert/doc
This is a documentation subpage for Template:JPYConvert. It may contain usage information, categories and other content that is not part of the original template page. |
Purpose
The purpose of this template is to automatically convert and format Japanese yen applying adjustment for inflation where appropriate. Rates of exchange and inflation must be manually copied by editors in the supporting templates therefore this template's output does not necessarily reflect the present exchange rates or price indices but, rather, reflects the rates and indices at the time of the last update.
The default target currency (USD at present) may change in the future.
The possibility of converting to other target currencies in the future is left open, hence the general name of this template.
Usage
{{JPYConvert|value|currency_units|year=|to=|r=|force=|lk=|exact=|showdate=|ref=|mode=|convert=}}
Parameters
A description of the template's parameters are listed below.
Field name | Usage | Example | Description |
value |
mandatory | 10000.01 | The value, in the country_code currency, that needs to be converted. The template will not accept pre-formatted values (i.e. 1,234). |
currency_units |
optional | m | Used to represent smaller or larger numbers. Available options are as follows.
The Indian units can be applied to any currency. |
lk |
optional | lk=on | This parameter gives you the option of internally linking currency names (paise, which is generalized here to mean cents in the source currency) and/or number names (billion, trillion, lakh, crore). By default, the parameter is set to "off" (i.e. it is set not to link). Available options are as follows.
|
year |
optional | year=2002 | This parameter allows entering values from previous years. The year will be displayed and historic values will be inflated to the latest year available in {{Inflation}} if index is also provided then converted by {{ToUSD}}. If no index name is present, the conversion will be attempted for the year indicated (but see force ). If year is not provided, just a conversion will be performed at the most current rate available.
|
to |
optional | to=EUR | This parameter allows for conversion to various different currencies. Currently, the USD (default) and the euro are supported. |
r |
optional | r=3 | Sets the digits to which the results must be rounded. A negative value indicates rounding to an upper significant digit, and a positive value indicates a fractional digit including trailing zeros. Defaults to 2 .
|
force |
optional | force=yes | This parameter allows to force a conversion at the most current rate available when data is lacking for the provided year when its value is yes .
|
exact |
optional | exact=source | This provides some control over formatting. source requests to display the input value normally (in American fashion) after applying the units. on does this for both the input and result values. Otherwise all values will be displayed as per {{Format price}}.
|
showdate |
optional | showdate=no | This allows to disable displaying the original year. |
ref |
optional | ref=<ref>some wikitext ref</ref> | This allows displaying one or more references next to the original value. Each one must consist of a ref wikitext element. |
mode |
optional | mode=historical | This parameter controls the output mode. Setting it to blank or omitting it results in the default mode. Setting it to historical allows conversion using historical exchange rates.
|
convert |
optional | convert=no | This parameter controls the currency conversion. Setting it to blank or omitting it results in the default mode. Setting it to no disables it.
|
Examples
JPYConvert syntax | Results |
---|---|
{{JPYConvert|1|ct|lk=on}} |
¥0.01 (US$0) |
{{JPYConvert|10|ct}} |
¥0.1 (US$0) |
{{JPYConvert|1|ct|exact=source}} |
¥0.01 (US$0) |
{{JPYConvert|10|ct|exact=source}} |
¥0.1 (US$0) |
{{JPYConvert|1|ct|exact=on}} |
¥0.01 (US$0) |
{{JPYConvert|10|ct|exact=on}} |
¥0.1 (US$0) |
{{JPYConvert|1|ct|year=2002}} |
¥0.01 (2002) (equivalent to ¥0.01 or US$0 in 2019)[1] |
{{JPYConvert|10|ct|year=2002}} |
¥0.1 (2002) (equivalent to ¥0.1 or US$0 in 2019)[1] |
{{JPYConvert|1|ct|year=2002|mode=historical}} |
¥0.01 (2002) (US$0) |
{{JPYConvert|10|ct|year=2002|mode=historical}} |
¥0.1 (2002) (US$0) |
{{JPYConvert|1|ct|year=2002|lk=on}} |
¥0.01 (2002) (equivalent to ¥0.01 or US$0 in 2019)[1] |
{{JPYConvert|10|ct|year=2002|lk=on}} |
¥0.1 (2002) (equivalent to ¥0.1 or US$0 in 2019)[1] |
{{JPYConvert|1|ct|year=2002|exact=on}} |
¥0.01 (2002) (equivalent to ¥0.01 or US$0 in 2019)[1] |
{{JPYConvert|10|ct|year=2002|exact=on}} |
¥0.1 (2002) (equivalent to ¥0.1 or US$0 in 2019)[1] |
{{JPYConvert|1|ct|lk=on|convert=no}} |
¥0.01 |
{{JPYConvert|10|ct|convert=no}} |
¥0.1 |
{{JPYConvert|1|ct|exact=source|convert=no}} |
¥0.01 |
{{JPYConvert|10|ct|exact=source|convert=no}} |
¥0.1 |
{{JPYConvert|1|ct|exact=on|convert=no}} |
¥0.01 |
{{JPYConvert|10|ct|exact=on|convert=no}} |
¥0.1 |
{{JPYConvert|1|ct|year=2002|convert=no}} |
¥0.01 (2002) (equivalent to ¥0.01 in 2019)[1] |
{{JPYConvert|10|ct|year=2002|convert=no}} |
¥0.1 (2002) (equivalent to ¥0.1 in 2019)[1] |
{{JPYConvert|1|ct|year=2002|mode=historical|convert=no}} |
¥0.01 (2002) |
{{JPYConvert|10|ct|year=2002|mode=historical|convert=no}} |
¥0.1 (2002) |
{{JPYConvert|1|ct|year=2002|lk=on|convert=no}} |
¥0.01 (2002) (equivalent to ¥0.01 in 2019)[1] |
{{JPYConvert|10|ct|year=2002|lk=on|convert=no}} |
¥0.1 (2002) (equivalent to ¥0.1 in 2019)[1] |
{{JPYConvert|1|ct|year=2002|exact=on|convert=no}} |
¥0.01 (2002) (equivalent to ¥0.01 in 2019)[1] |
{{JPYConvert|10|ct|year=2002|exact=on|convert=no}} |
¥0.1 (2002) (equivalent to ¥0.1 in 2019)[1] |
{{JPYConvert|1}} |
¥1 (US$0.01) |
{{JPYConvert|1|k}} |
¥1,000 (US$9.11) |
{{JPYConvert|1|m}} |
¥1 million (US$9,111.62) |
{{JPYConvert|1|b|lk=on}} |
¥1 billion (US$9.11 million) |
{{JPYConvert|1|t|lk=on}} |
¥1 trillion (US$9.11 billion) |
{{JPYConvert|1|exact=source}} |
¥1 (US$0.01) |
{{JPYConvert|1|k|exact=source}} |
¥1,000 (US$9.11) |
{{JPYConvert|1|m|exact=source}} |
¥1,000,000 (US$9,111.62) |
{{JPYConvert|1|b|exact=source}} |
¥1,000,000,000 (US$9.11 million) |
{{JPYConvert|1|t|exact=source}} |
¥1,000,000,000,000 (US$9.11 billion) |
{{JPYConvert|1|exact=on}} |
¥1 (US$0.01) |
{{JPYConvert|1|k|exact=on}} |
¥1,000 (US$9.11) |
{{JPYConvert|1|m|exact=on}} |
¥1,000,000 (US$9,111.62) |
{{JPYConvert|1|b|exact=on}} |
¥1,000,000,000 (US$9,111,617.31) |
{{JPYConvert|1|t|exact=on}} |
¥1,000,000,000,000 (US$9,111,617,312.07) |
{{JPYConvert|1|year=2002}} |
¥1 (2002) (equivalent to ¥1.04 or US$0.01 in 2019)[1] |
{{JPYConvert|1|k|year=2002}} |
¥1,000 (2002) (equivalent to ¥1,040.59 or US$9.55 in 2019)[1] |
{{JPYConvert|1|m|year=2002}} |
¥1 million (2002) (equivalent to ¥1.04 million or US$9,545.89 in 2019)[1] |
{{JPYConvert|1|b|year=2002}} |
¥1 billion (2002) (equivalent to ¥1.04 billion or US$9.55 million in 2019)[1] |
{{JPYConvert|1|t|year=2002}} |
¥1 trillion (2002) (equivalent to ¥1.04 trillion or US$9.55 billion in 2019)[1] |
{{JPYConvert|1|year=2002|lk=on}} |
¥1 (2002) (equivalent to ¥1.04 or US$0.01 in 2019)[1] |
{{JPYConvert|1|k|year=2002|lk=on}} |
¥1,000 (2002) (equivalent to ¥1,040.59 or US$9.55 in 2019)[1] |
{{JPYConvert|1|m|year=2002|lk=on}} |
¥1 million (2002) (equivalent to ¥1.04 million or US$9,545.89 in 2019)[1] |
{{JPYConvert|1|b|year=2002|lk=on}} |
¥1 billion (2002) (equivalent to ¥1.04 billion or US$9.55 million in 2019)[1] |
{{JPYConvert|1|t|year=2002|lk=on}} |
¥1 trillion (2002) (equivalent to ¥1.04 trillion or US$9.55 billion in 2019)[1] |
{{JPYConvert|3.60}} |
¥3.6 (US$0.03) |
{{JPYConvert|360}} |
¥360 (US$3.28) |
{{JPYConvert|3600}} |
¥3,600 (US$32.8) |
{{JPYConvert|360000}} |
¥360,000 (US$3,280.18) |
{{JPYConvert|3600000}} |
¥3.6 million (US$32,801.82) |
{{JPYConvert|3.6|m}} |
¥3.6 million (US$32,801.82) |
{{JPYConvert|3650000}} |
¥3.65 million (US$33,257.4) |
{{JPYConvert|3.65|m}} |
¥3.65 million (US$33,257.4) |
{{JPYConvert|3650000|year=1946}} |
¥3.65 million (1946) (equivalent to ¥147.19 million or US$1.35 million in 2019)[1] |
{{JPYConvert|3.65|m|year=1946}} |
¥3.65 million (1946) (equivalent to ¥147.19 million or US$1.35 million in 2019)[1] |
{{JPYConvert|3650000|year=1946|exact=source}} |
¥3,650,000 (1946) (equivalent to ¥147.19 million or US$1.35 million in 2019)[1] |
{{JPYConvert|3.65|m|year=1946|exact=source}} |
¥3,650,000 (1946) (equivalent to ¥147.19 million or US$1.35 million in 2019)[1] |
{{JPYConvert|3650000|year=1946|force=yes}} |
¥3.65 million (1946) (equivalent to ¥147.19 million or US$1.35 million in 2019)[1] |
{{JPYConvert|3.65|m|year=1946|force=yes}} |
¥3.65 million (1946) (equivalent to ¥147.19 million or US$1.35 million in 2019)[1] |
{{JPYConvert|3650000|year=1946|force=yes|exact=on}} |
¥3,650,000 (1946) (equivalent to ¥147,187,583.93 or US$1,350,225.07 in 2019)[1] |
{{JPYConvert|3.65|m|year=1946|force=yes|exact=on}} |
¥3,650,000 (1946) (equivalent to ¥147,187,583.93 or US$1,350,225.07 in 2019)[1] |
{{JPYConvert|3650000|year=2002}} |
¥3.65 million (2002) (equivalent to ¥3.8 million or US$34,842.49 in 2019)[1] |
{{JPYConvert|3.65|m|year=2002}} |
¥3.65 million (2002) (equivalent to ¥3.8 million or US$34,842.49 in 2019)[1] |
{{JPYConvert|3650000|year=2002|exact=on}} |
¥3,650,000 (2002) (equivalent to ¥3,798,168.32 or US$34,842.49 in 2019)[1] |
{{JPYConvert|3.65|m|year=2002|exact=on}} |
¥3,650,000 (2002) (equivalent to ¥3,798,168.32 or US$34,842.49 in 2019)[1] |
{{JPYConvert|3650000|year=2002|exact=source}} |
¥3,650,000 (2002) (equivalent to ¥3.8 million or US$34,842.49 in 2019)[1] |
{{JPYConvert|3.65|m|year=2002|exact=source}} |
¥3,650,000 (2002) (equivalent to ¥3.8 million or US$34,842.49 in 2019)[1] |
{{JPYConvert|3650000|year=2002|exact=on}} |
¥3,650,000 (2002) (equivalent to ¥3,798,168.32 or US$34,842.49 in 2019)[1] |
{{JPYConvert|3.65|m|year=2002|exact=on}} |
¥3,650,000 (2002) (equivalent to ¥3,798,168.32 or US$34,842.49 in 2019)[1] |
{{JPYConvert|3600000|year=1962|ref=<ref name="qv">something1</ref>}} |
¥3.6 million (1962)[2] (equivalent to ¥18.25 million or US$167,391.76 in 2019)[1] |
{{JPYConvert|3600000|year=1962|ref=<ref name="qv">something1</ref><ref>something2</ref>}} |
¥3.6 million (1962)[2][3] (equivalent to ¥18.25 million or US$167,391.76 in 2019)[1] |
{{JPYConvert|3600000|year=2011|to=EUR|ref=<ref name="qv">something1</ref>}} |
¥3.6 million (2011)[2] (equivalent to ¥3.79 million or €31,103.88 in 2019)[1] |
{{JPYConvert|3600000|year=2011|to=EUR|showdate=no|ref=<ref name="qv">something1</ref>}} |
¥3.6 million[2] (equivalent to ¥3.79 million or €31,103.88 in 2019)[1] |
- ^ a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap 1868 to 1938: Williamson J., Nominal Wage, Cost of Living, Real Wage and Land Rent Data for Japan 1831-1938, 1939 to 1945: Bank of Japan Historical Statistics Afterwards, Japanese Historical Consumer Price Index numbers based on data available from the Japanese Statistics Bureau. Japan Historical Consumer Price Index (CPI) – 1970 to 2014 Retrieved 30 July 2014. For between 1946 and 1970, from "昭和戦後史". Retrieved 2015-01-24.
- ^ a b c d something1
- ^ something2
See also
- {{FXConvert}}: Inflates and converts a given currency to US dollars or Euro. It is used by {{JPYConvert}}.
TemplateData
TemplateData for JPYConvert
<templatedata> { "params": { "1": { "label": "Value", "description": "The value, in the source, that needs to be converted. The template will not accept pre-formatted values (i.e. 1,234).", "example": "500000000",
"type": "number",
"required": true }, "2": { "label": "Currency units", "description": "Use this to represent larger numbers such as crores, billions et al.", "example": "c, lc, b, m, k, cr, p, pa, po, ba",
"type": "line",
"suggested": true }, "lk": { "label": "Linking", "description": "Gives option to whether link currency names (paise, etc.) or number names (crores, lakhs, billions, trillions)", "example": "on, off, source, original, inflated, result, converted, source-converted",
"type": "line",
"suggested": true }, "year": { "description": "This parameter allows for inflation. Historic values will be inflated to the most current values available then converted.", "example": "2015", "label": "Year",
"type": "number",
"suggested": true },
"to": {
"description": "This parameter allows for conversion to various different currencies. The USD (default) and the euro are currently supported.", "example": "EUR", "default": "USD", "label": "To" },
"r": {
"label": "Rounding digits", "description": "Used to round significant digits. A value of \"0\" will drop paise or cent values from the converted number. By default the conversion will be rounded to two significant figures.", "example": "0",
"type": "number"
},
"force": {
"label": "Force", "description": "This parameter allows to force a conversion at the most current rate available when data is lacking for the provided year when its value is \"yes\".", "example": "yes",
"type": "line"
},
"exact": {
"label": "Exact", "description": "This provides some control over formatting. \"source\" requests to display the input value normally (in American fashion) after applying the units. \"on\" does this for both the input and result values. Otherwise all values will be displayed as per Format price.", "example": "source, on",
"type": "line"
},
"showdate": {
"label": "Show date", "description": "This allows to disable displaying the original year.", "example": "no",
"type": "line"
},
"ref": {
"label": "References", "description": "This allows displaying one or more references next to the original value. Each one must consist of a ref wikitext element.", "example": "[1]",
"type": "content", "suggested": true
},
"mode": {
"description": "This parameter allows for the control of the output mode. Currently, blank (default) and historical are supported. In historical mode, conversions are performed using a historical exchange rate, for the year supplied.", "example": "historical", "default": "(blank)", "label": "Mode",
"type": "line"
},
"convert": {
"description": "This parameter controls the currency conversion. Setting it to blank or omitting it results in the default mode. Setting it to no
disables it.",
"example": "no",
"default": "(blank)",
"label": "Convert",
"type": "line"
} }, "paramOrder": [ "1", "2",
"lk",
"year",
"to",
"r",
"force", "exact", "showdate", "ref", "mode", "convert"
], "description": "Template calculates a value of Japanese yen, which you can enter, to US dollars and then presents the results." } </templatedata>
- ^ some wikitext ref