Template:US$
概要
This is a multifunction template. At its simplest, it adds the currency mark "US$", as recommended by MOS:CURRENCY for many situations. The template can also link to the United States dollar article and can even calculate inflation. See warnings below.
參 數 及使用 方法
{{US$|
{{US$}}
→美 元 {{US$|1234.56}}
→ 1,234.56美 元 {{US$|1.23
→ 1.23千 萬 }}千 萬 美 元
連結
The parameter |link=yes
may be used to link US$ to the article United States dollar. This is turned off by default, but may be appropriate for the first occurrence of the term in an article.
{{US$|123.45}}
→ 123.45美 元 {{US$|123.45|link=yes}}
→ 123.45美 元
計算 通 脹
Do not assume that using this template will mean that a calculated value is "current", "as of 2024", "as of 2023" or even necessarily "recent". Do not use {{CURRENTYEAR}} to refer to calculated value, instead {{Inflation/year|US}} may be used. See also MOS:REALTIME. |
The template supports inflation calculation, by way of {{Inflation}}
. If the second parameter is used, to specify a year, and this year is within a certain range of available inflation data (specifically, if 1800 ≤ year
< 2023), the equivalent value represented in 2023 dollars will be calculated in parentheses. However, this function should only be used in appropriate situations.
- Examples
{{US$|100|1799}}
→ 100美 元 {{US$|100|1800}}
→ 100美 元 (相等 於2023年 的 1,795美 元 ){{US$|100|1966}}
→ 100美 元 (相等 於2023年 的 939.08美 元 ){{US$|100|1966|link=yes}}
→ 100美 元 (相等 於2023年 的 939.08美 元 ){{US$|100|2022}}
→ 100美 元 (相等 於2023年 的 104.12美 元 ){{US$|100|2023}}
→ 100美 元 {{US$|100|2024}}
→ 100美 元 {{US$|100|2025}}
→ 100美 元
Additional parameter |about=yes
will cause the template to calculate to the nearest dollar (instead of the nearest cent), and prefix the calculated value with "about". The rounding can be fine-tuned further by using |round=integer
. These parameters may be combined.
- Examples
{{US$|10|1935}}
→ 10美 元 (相等 於2023年 的 222.23美 元 ){{US$|10|1935|round=0}}
→ 10美 元 (相等 於2023年 的 222美 元 ){{US$|10|1935|about=yes}}
→ 10美 元 (相等 於2023年 的 約 222美 元 ){{US$|1000|1935|round=2}}
→ 1,000美 元 (相等 於2023年 的 22,223.3美 元 ){{US$|1000|1935|round=-2}}
→ 1,000美 元 (相等 於2023年 的 22,200美 元 ){{US$|1000|1935|round=-2|about=yes}}
→ 1,000美 元 (相等 於2023年 的 約 22,200美 元 )
- Caution
The inflation-calculation code causes this template to approach the 40-deep expansion depth limit in the software that makes Wikipedia work. Pages that exceed this limit are placed in Category:Pages where expansion depth is exceeded. Using |about=yes
can reduce the impact somewhat. If you call this template from within another template and use the inflation feature, consider adding a caution similar to this one to that template's documention page.
重定 向
模 板 编辑说明
This is a multifunction template. At its simplest, it adds the currency mark "US$", as recommended by MOS:CURRENCY for many situations. The template can also link to the United States dollar article and can even calculate inflation.
描述 | 类型 | |||
---|---|---|---|---|
1 | ||||
2 year | Specify a year and, if this year is between 1800 and the current year minus 1, the inflation-adjusted value will be calculated in parentheses | 推荐 | ||
link | Link US$ to article
| 推荐 | ||
About? | about | If yes, calculate to the nearest dollar (instead of the nearest cent) and prefix the calculated value with "about"
| ||
Decimal points | round | Integer, where round to number of decimal points specified, use negative (for example, -2) for significant figures
| 推荐 |