Jump to content

Template:ShipCost/doc

From Wikipedia, the free encyclopedia


Purpose

[edit]

The purpose of this template is to abstract and format ship costs.

Currently configured so no adjustments or conversions are applied.

Usage

[edit]

{{ShipCost|country|value|currency_units|year=|origin=|r=|force=|lk=|exact=|qty=|tot=|suffix=|est=|ref=|mode=}}

Parameters

[edit]

A description of the template's parameters are listed below.

Field name Usage Example Description
country_code mandatory GBR The country code of the currency, see the examples to find out what is currently supported. EUR for Euro (inflation adjustment would require using a country-specific code).
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.
  • ct – to represent cent(s)
  • p – to represent penny (pence)
  • pa – to represent paisa (paise) (generalized to mean cents)
  • po – to represent poysha (generalized to mean cents)
  • ba – to represent baisa(s) (generalized to mean 1/1000)
  • k – to represent thousand(s)
  • m – to represent million(s)
  • b – to represent short scale billion(s)
  • t – to represent short scale trillion(s)
  • l – to represent lakh(s)
  • c – to represent crore(s)
  • lc – to represent lakh crore(s)
  • Brackets in the sense may be singular (or) plural.

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.
  • on – to link all units
  • source – to link the source value
  • original – to link the values in the original currency
  • inflated – to link the inflated value in the original currency
  • result – to link the inflated and converted vales
  • converted – to link the converted value
  • source-converted – to link the source and converted values
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.
origin optional origin=ESP The country code of the shipyard's location, by default that corresponding to the currency is assumed (no country assumed for Euro).
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}}.
qty optional qty=first This allows adding a phrase that indicates to how many or which units the cost applies to.
tot optional tot=yes yes indicates that the cost includes technology transfer.
suffix optional suffix=and training facilities This allows appending an arbitrary wikitext to the output.
est optional est=yes yes indicates that the cost is estimated.
ref optional ref=<ref>some wikitext ref</ref> This allows displaying one or more references. Each one must consist of a ref wikitext element. The placement of the references is normalized (currently after the year, but this might be changed in the future).
mode optional mode=historical This parameter allows to disable adjustment even if the template is configured to enable it.

Examples

[edit]
ShipCost syntax Results
{{ShipCost|ARG|3600000}} ARS 3.6 million
{{ShipCost|ARG|3600000|year=1992}} ARS 3.6 million (1992)
{{ShipCost|ARG|3600000|year=1991}} Year not supported
{{ShipCost|AUS|3.6|m}} A$3.6 million
{{ShipCost|AUS|3600000}} A$3.6 million
{{ShipCost|AUS|3654000|year=1962}} A$3.65 million (1962)
{{ShipCost|AUS|3654000|year=1962|origin=AUS}} A$3.65 million (1962)
{{ShipCost|AUS|3654000|year=1962|origin=ESP}} A$3.65 million (1962)
{{ShipCost|AUS|3654000|year=1962|r=3|ref=<ref name="qv">something1</ref>}} A$3.654 million (1962)[1]
{{ShipCost|AUS|3.6|m|qty=}} A$3.6 million
{{ShipCost|AUS|3.6|m|qty=first}} A$3.6 million for the first unit
{{ShipCost|AUS|3.6|m|qty=1}} A$3.6 million per unit
{{ShipCost|AUS|3.6|m|qty=8}} A$3.6 million for 8 units
{{ShipCost|AUS|3650000|year=1962|exact=on|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$3,650,000 (1962)[1][2]
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|suffix= + [[Technology transfer|ToT]]|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$3,650,000 (1962)[1][2] for 8 units + ToT
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|tot=yes|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$3,650,000 (1962)[1][2] for 8 units + ToT
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|tot=yes|suffix=and training facilities|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$3,650,000 (1962)[1][2] for 8 units + ToT and training facilities
{{ShipCost|AUS|3650000|year=1962|exact=on|qty=8|tot=yes|est=yes|suffix=and training facilities|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$3,650,000 (1962)[1][2] for 8 units + ToT and training facilities (est.)
{{ShipCost|AUS|3650000|year=1962|exact=on|mode=historical|qty=8|tot=yes|est=yes|suffix=and training facilities|ref=<ref name="qv">something1</ref><ref name="s">something2</ref>}} A$3,650,000 (1962)[1][2] for 8 units + ToT and training facilities (est.)
{{ShipCost|BEL|3600000}} 3.6 million
{{ShipCost|BEL|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|BEL|3600000|year=1998}} BEF 3.6 million (1998)
{{ShipCost|BEL|3600000|year=1947}} BEF 3.6 million (1947)
{{ShipCost|BEL|3600000|year=1946}} Year not supported
{{ShipCost|BRA|3600000}} R$3.6 million
{{ShipCost|BRA|3600000|year=1995}} R$3.6 million (1995)
{{ShipCost|BRA|3600000|year=1994}} Year not supported
{{ShipCost|CAN|3600000}} CA$3.6 million
{{ShipCost|CAN|3600000|year=1962}} CA$3.6 million (1962)
{{ShipCost|CHN|3600000}} CN¥3.6 million
{{ShipCost|CHN|3600000|year=1949}} CN¥3.6 million (1949)
{{ShipCost|CHN|3600000|year=1948}} Year not supported
{{ShipCost|GER|3600000}} Use DEU
{{ShipCost|GER|3600000|year=1999}} Use DEU
{{ShipCost|GER|3600000|year=1998}} Use DEU
{{ShipCost|GER|3600000|year=1949}} Use DEU
{{ShipCost|GER|3600000|year=1948}} Use DEU
{{ShipCost|DEU|3600000}} 3.6 million
{{ShipCost|DEU|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|DEU|3600000|year=1998}} DM 3.6 million (1998)
{{ShipCost|DEU|3600000|year=1949}} DM 3.6 million (1949)
{{ShipCost|DEU|3600000|year=1948}} Year not supported
{{ShipCost|DNK|3600000}} DKK 3.6 million
{{ShipCost|DNK|3600000|year=1874}} DKK 3.6 million (1874)
{{ShipCost|DNK|3600000|year=1873}} Year not supported
{{ShipCost|ESP|3600000}} 3.6 million
{{ShipCost|ESP|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|ESP|3600000|year=1998}}  3.6 million (1998)
{{ShipCost|ESP|3600000|year=1869}}  3.6 million (1869)
{{ShipCost|ESP|3600000|year=1868}} Year not supported
{{ShipCost|EUR|3600000}} 3.6 million
{{ShipCost|EUR|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|FIN|3600000}} 3.6 million
{{ShipCost|FIN|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|FIN|3600000|year=1998}} FIM 3.6 million (1998)
{{ShipCost|FIN|3600000|year=1861}} FIM 3.6 million (1861)
{{ShipCost|FIN|3600000|year=1860}} Year not supported
{{ShipCost|FRA|3600000}} 3.6 million
{{ShipCost|FRA|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|FRA|3600000|year=1998}} FRF 3.6 million (1998)
{{ShipCost|FRA|3600000|year=1960}} FRF 3.6 million (1960)
{{ShipCost|FRA|3600000|year=1959}} FF 3.6 million (1959)
{{ShipCost|FRA|3600000|year=1796}} FF 3.6 million (1796)
{{ShipCost|FRA|3600000|year=1795}} Year not supported
{{ShipCost|GBR|3600000}} £3.6 million
{{ShipCost|GBR|3600000|year=1962}} £3.6 million (1962)
{{ShipCost|GRC|3600000}} 3.6 million
{{ShipCost|GRC|3600000|year=2001}} 3.6 million (2001)
{{ShipCost|GRC|3600000|year=2000}} Modern drachma3.6 million (2000)
{{ShipCost|GRC|3600000|year=1955}} Modern drachma3.6 million (1955)
{{ShipCost|GRC|3600000|year=1954}} Year not supported
{{ShipCost|HRV|3600000}} HRK 3.6 million
{{ShipCost|HRV|3600000|year=1995}} HRK 3.6 million (1995)
{{ShipCost|HRV|3600000|year=1994}} Year not supported
{{ShipCost|IRL|3600000}} 3.6 million
{{ShipCost|IRL|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|IRL|3600000|year=1998}} IR£3.6 million (1998)
{{ShipCost|IRL|3600000|year=1939}} IR£3.6 million (1939)
{{ShipCost|IRL|3600000|year=1038}} Year not supported
{{ShipCost|ITA|3600000}} 3.6 million
{{ShipCost|ITA|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|ITA|3600000|year=1998}} Lit. 3.6 million (1998)
{{ShipCost|ITA|3600000|year=1863}} Lit. 3.6 million (1863)
{{ShipCost|ITA|3600000|year=1862}} Year not supported
{{ShipCost|JPN|3600000}} ¥3.6 million
{{ShipCost|JPN|3600000|year=1962}} ¥3.6 million (1962)
{{ShipCost|KOR|3600000}} 3.6 million
{{ShipCost|KOR|3600000|year=1962}} 3.6 million (1962)
{{ShipCost|LUX|3600000}} 3.6 million
{{ShipCost|LUX|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|LUX|3600000|year=1998}} LUF 3.6 million (1998)
{{ShipCost|LUX|3600000|year=1945}} LUF 3.6 million (1945)
{{ShipCost|LUX|3600000|year=1944}} Year not supported
{{ShipCost|MLT|3600000}} 3.6 million
{{ShipCost|MLT|3600000|year=2008}} 3.6 million (2008)
{{ShipCost|MLT|3600000|year=2007}} Lm 3.6 million (2007)
{{ShipCost|MLT|3600000|year=1973}} Lm 3.6 million (1973)
{{ShipCost|MLT|3600000|year=1972}} Year not supported
{{ShipCost|MYS|3600000}} RM 3.6 million
{{ShipCost|MYS|3600000|year=1976}} RM 3.6 million (1976)
{{ShipCost|MYS|3600000|year=1975}} Year not supported
{{ShipCost|NLD|3600000}} 3.6 million
{{ShipCost|NLD|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|NLD|3600000|year=1998}} ƒ3.6 million (1998)
{{ShipCost|NLD|3600000|year=1815}} ƒ3.6 million (1815)
{{ShipCost|NLD|3600000|year=1814}} Year not supported
{{ShipCost|NOR|3600000}} NOK 3.6 million
{{ShipCost|NOR|3600000|year=1876}} NOK 3.6 million (1876)
{{ShipCost|NOR|3600000|year=1875}} Year not supported
{{ShipCost|NZL|3600000}} NZ$3.6 million
{{ShipCost|NZL|3600000|year=1968}} NZ$3.6 million (1968)
{{ShipCost|NZL|3600000|year=1967}} Year not supported
{{ShipCost|PHL|3600000}} 3.6 million
{{ShipCost|PHL|3600000|year=1946}} 3.6 million (1946)
{{ShipCost|PHL|3600000|year=1945}} Year not supported
{{ShipCost|POL|3600000}} PLN 3.6 million
{{ShipCost|POL|3600000|year=1995}} PLN 3.6 million (1995)
{{ShipCost|POL|3600000|year=1994}} PLZ 3.6 million (1994)
{{ShipCost|POL|3600000|year=1951}} PLZ 3.6 million (1951)
{{ShipCost|POL|3600000|year=1950}} Year not supported
{{ShipCost|PRT|3600000}} 3.6 million
{{ShipCost|PRT|3600000|year=1999}} 3.6 million (1999)
{{ShipCost|PRT|3600000|year=1998}} PTE 3.6 million (1998)
{{ShipCost|PRT|3600000|year=1912}} PTE 3.6 million (1912)
{{ShipCost|PRT|3600000|year=1911}} Year not supported
{{ShipCost|ROU|3600000}} RON 3.6 million
{{ShipCost|ROU|3600000|year=2006}} RON 3.6 million (2006)
{{ShipCost|ROU|3600000|year=2005}} Year not supported
{{ShipCost|ROU|3600000|year=2004}} ROL 3.6 million (2004)
{{ShipCost|ROU|3600000|year=1953}} ROL 3.6 million (1953)
{{ShipCost|ROU|3600000|year=1952}} Year not supported
{{ShipCost|ROU|3600000|year=1951}} Year not supported
{{ShipCost|SWE|3600000}} SEK 3.6 million
{{ShipCost|SWE|3600000|year=1874}} SEK 3.6 million (1874)
{{ShipCost|SWE|3600000|year=1873}} Year not supported
{{ShipCost|USA|3600}} US$3,600
{{ShipCost|USA|3600|year=1790}} US$3,600 (1790)
{{ShipCost|ZAF|3600000}} R3.6 million
{{ShipCost|ZAF|3600000|year=1962}} R3.6 million (1962)
  1. ^ a b c d e f g something1
  2. ^ a b c d e f something2

See also

[edit]
  • {{FXConvert}}: Inflates and converts a given currency to US dollars. It is used by {{ShipCost}}.

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:ShipCost in articles based on its TemplateData.

TemplateData for ShipCost

Template presents the cost of a ship.

Template parameters

ParameterDescriptionTypeStatus
Currency country code1

ISO 3166-1 alpha-3 country code of the currency, see the examples to find out what is currently supported. EUR for Euro (inflation adjustment would require using a country-specific code).

Example
GBR
Linerequired
Value2

The value, in the source, that needs to be converted. The template will not accept pre-formatted values (i.e. 1,234).

Example
500000000
Numberrequired
Currency units3

Use this to represent larger numbers such as crores, billions et al.

Example
c, lc, b, m, k, cr, p, pa, po, ba
Linesuggested
Linkinglk

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
Linesuggested
Yearyear

This parameter allows for inflation. Historic values will be inflated to the most current values available then converted.

Example
2015
Numbersuggested
Originorigin

ISO 3166-1 alpha-3 country code of the shipyard's location, by default that corresponding to the currency is assumed (no country assumed for Euro).

Example
ESP
Lineoptional
Rounding digitsr

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
Numberoptional
Forceforce

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
Lineoptional
Exactexact

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
Lineoptional
Quantityqty

This allows adding a phrase that indicates to how many or which units the cost applies to.

Example
first, 1, 4
Lineoptional
Technology transfertot

yes indicates that the cost includes technology transfer

Example
yes
Lineoptional
Suffixsuffix

This allows appending an arbitrary wikitext to the output.

Example
and training facilities
Lineoptional
Estimatedest

yes indicates that the cost is estimated

Example
yes
Lineoptional
Referencesref

This allows displaying one or more references. Each one must consist of a ref wikitext element. The placement of the references is normalized (currently after the year, but this might be changed in the future).

Example
<ref>some wikitext ref</ref>
Contentsuggested
Modemode

This parameter allows to disable the adjustment even if the template is enabling it.

Default
(blank)
Example
historical
Lineoptional