الگو:CAD
CA$
This is a multifunction template. At its simplest, it adds the currency mark "CA$", as recommended by ویکیپدیا:شیوهنامه/تاریخها و اعداد for many situations. The template can also link to the دلار کانادا article and can even calculate inflation. See warnings below.
Usage ویرایش
{{CAD|number}}
Additional text like "million" or "trillion" must be placed outside the template, typically preceded by a non-breaking space (see example below).
Example:
{{CAD}}
→ CA${{CAD|123.45}}
→ CA$۱۲۳٫۴۵{{CAD|123}}{{فاصله}}million
→ CA$۱۲۳ million
Link ویرایش
The parameter |link=yes
may be used to link CA$ to the article دلار کانادا. This is turned off by default, but may be appropriate for the first occurrence of the term in an article.
Example:
{{CAD|123.45|link=yes}}
→ دلار کانادا۱۲۳٫۴۵
Inflation calculation ویرایش
Do not assume that using this template will mean that a calculated value is "current", "as of ۲۰۲۴", "as of خطای عبارت: نویسه نقطهگذاری شناخته نشده «۲»" or even necessarily "recent". Do not use {{CURRENTYEAR}} to refer to calculated value, instead {{Inflation/year|CA}} may be used. See also ویکیپدیا:شیوهنامه/واژههایی که باید مواظب استفاده از آنها بود. |
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 ۱۶۸۸ ≤ year
< ۲۰۲۱), the equivalent value represented in ۲۰۲۱ dollars will be calculated in parentheses. However, this function should only be used in appropriate situations.
Examples:
{{CAD|100|خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»}}
→ CA$۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|100|۱۶۸۸}}
→ CA$۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|100|1966}}
→ CA$۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|100|1966|link=yes}}
→ دلار کانادا۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|100|خطای عبارت: نویسه نقطهگذاری شناخته نشده «۲»}}
→ CA$۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|100|۲۰۲۱}}
→ CA$۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|100|۲۰۲۴}}
→ CA$۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|100|خطای عبارت: نویسه نقطهگذاری شناخته نشده «۲»}}
→ CA$۱۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»
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:
{{CAD|10|1935}}
→ CA$۱۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|10|1935|round=0}}
→ CA$۱۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|10|1935|about=yes}}
→ CA$۱۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|1000|1935|round=2}}
→ CA$۱٬۰۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|1000|1935|round=-2}}
→ CA$۱٬۰۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»{{CAD|1000|1935|round=-2|about=yes}}
→ CA$۱٬۰۰۰خطای عبارت: نویسه نقطهگذاری شناخته نشده «۱»