Template:Cvt/doc
From Wikipedia, the free encyclopedia
This template {{cvt}} is similar to {{convert}}, with one change: {{cvt}} has option |abbr=on
preset.
This is a documentation subpage for Template:Cvt. It may contain usage information, categories and other content that is not part of the original template page. |
For currency conversion into US dollars, see Template:To USD
This template is used on 18,000+ pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before changing this template. |
See this information on copying this template and modifying it for use on another wiki. |
This template uses Lua: |
This is a documentation subpage for Template:Cvt. It may contain usage information, categories and other content that is not part of the original template page. |
Template {{convert}} calculates from one measurement unit to another one, and then presents the results formatted. For example:
{{convert|2|km|mi}}
→ 2 kilometres (1.2 mi) (km entered, so converted into mile){{convert|7|mi|km}}
→ 7 miles (11 km) (mi entered, so converted into km)
Numbers can be rounded, units can be abbreviated into symbols:
{{convert|2|km|mi|2|abbr=on}}
→ 2 km (1.24 mi){{convert|7|mi|km|2|abbr=on}}
→ 7 mi (11.27 km)
Value ranges can be entered using |to|...
or |-|...
:
{{convert|2|to|5|km|mi}}
→ 2 to 5 kilometres (1.2 to 3.1 mi){{convert|2|-|5|km|mi}}
→ 2–5 kilometres (1.2–3.1 mi)
Combined effect example:
{{convert|2|-|5|km|mi|2|abbr=on}}
→ 2–5 km (1.24–3.11 mi){{convert|2|and|5|km|mi|sigfig=3|abbr=off}}
→ 2 and 5 kilometres (1.24 and 3.11 miles)
See Help:Convert for more detailed, technical information