模板:Format price
(重新導向自Template:Formatprice)
頁面Module:Documentation/styles.css沒有內容。
File:Test Template Info-Icon - Version (2).svg 模板文件[檢視] [編輯] [歷史] [清除快取]
This template displays numbers typically representing prices in a pleasant way, ideally suited for articles. Numbers one thousand or greater are reduced down and rounded to a total of three digits followed by a multiplier text, and smaller numbers received separators and exactly two digits to represent cents, which does not always happen with the {{formatnum:}} magic word.
用法[編輯]
Template:Tlx
Where:
- value: the value that will be formatted and displayed (required).
- digits: sets the digit in which a value lower than one thousand must be rounded, defaulting to "2" (cents) if unspecified.
Providing non-numeric parameters, failing to provide any parameter, or providing a negative value parameter, result all in a link to the NaN article. Despite its name, this template only handles the number-formatting, not any unit symbols – consider {{currency}} for that separate feature.
範例[編輯]
- Green tick Template:Tlx = 1.20
- Green tick Template:Tlx = 456.79
- Green tick Template:Tlx = 456.80
- Green tick Template:Tlx = 457
- Green tick Template:Tlx = 500
- Green tick $Template:Tlx = $1.23千
- Green tick $Template:Tlx = $1.23萬
- Green tick $Template:Tlx = $12.3萬
- Green tick $Template:Tlx = $100萬
- Green tick ¥Template:Tlx = ¥98.8萬億
- Green tick Template:Tlx atoms = 78.6秭 atoms
- Red X Template:Tlx = NaN
- Red X Template:Tlx = NaN
- Red X Template:Tlx = NaN
- Red X Template:Tlx = NaN
參見[編輯]
- {{Inflation}}
- {{Inflation-fn}}