模板:Format price/doc
跳至導覽
跳至搜尋
頁面Module:Message box/mbox.css沒有內容。頁面Template:Ombox/style.css沒有內容。
| File:Edit-copy green.svg | 此頁面是Template:Format price的[[Wikipedia:模板文件頁模式|Template:NSPN]]。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
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}}