Template:Convert/doc/range separator list: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>DePiep
No edit summary
Ookami (talk | contribs)
m 53 revisions imported
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{| class="wikitable sortable collapsible {{{state|uncollapsed}}}" style="width:100%;"
{| class="wikitable sortable collapsible {{{state|uncollapsed}}}" style="width:100%;"
! colspan=4 style="background:#eee" | {{navbar-collapsible|'''Range separators in <nowiki>{{convert}}</nowiki>'''|Convert/doc/range separator list}}
! colspan=4 style="background:#eee" | {{navbar-collapsible|Range separators in <nowiki>{{convert}}</nowiki>|Convert/doc/range separator list}}
|-
|-
! Separator
! Separator
Line 10: Line 10:
| <code><nowiki>{{convert|3|-|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|-|6|ft}}</nowiki></code>
| {{convert|3|-|6|ft}}
| {{convert|3|-|6|ft}}
| rowspan=2 | input can be hyphen (-) or [[Dash#En dash|en&nbsp;dash]] (–), output uses en&nbsp;dashes
| rowspan=2 | Input can be hyphen (-) or [[Dash#En dash|en&nbsp;dash]] (–), output uses en&nbsp;dash
|-
|-
| {{hidden sort key|-}}<code>&ndash;</code>&nbsp;<code>&amp;ndash;</code><small>(en&nbsp;dash)</small>
| data-sort-value="-" | <code>&ndash;</code>&nbsp;<code>&amp;ndash;</code> <small>(en&nbsp;dash)</small>
| <code><nowiki>{{convert|3|–|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|–|6|ft}}</nowiki></code>
| {{convert|3|–|6|ft}}
| {{convert|3|–|6|ft}}
Line 19: Line 19:
| <code><nowiki>{{convert|3|and|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|and|6|ft}}</nowiki></code>
| {{convert|3|and|6|ft}}
| {{convert|3|and|6|ft}}
|-
|
| {{hidden sort key|and&}}<code>&</code>
| <code><nowiki>{{convert|3|&|6|ft}}</nowiki></code>
| {{convert|3|&|6|ft}}
| Same as <code>and</code>
|-
|-
| <code>and(-)</code>
| <code>and(-)</code>
| <code><nowiki>{{convert|3|and(-)|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|and(-)|6|ft}}</nowiki></code>
| {{convert|3|and(-)|6|ft}}
| {{convert|3|and(-)|6|ft}}
| rowspan=2 | {{para|abbr|on}} alters the punctuation
| rowspan=2 | {{para|abbr|on}} abbreviates the first unit
|-
|-
| <code>and(-)&#x7c;abbr=on</code>
| <code>and(-)&#x7c;abbr=on</code>
Line 37: Line 33:
| <code><nowiki>{{convert|3|or|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|or|6|ft}}</nowiki></code>
| {{convert|3|or|6|ft}}
| {{convert|3|or|6|ft}}
|
|-
|-
| <code>to</code>
| <code>to</code>
| <code><nowiki>{{convert|3|to|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|to|6|ft}}</nowiki></code>
| {{convert|3|to|6|ft}}
| {{convert|3|to|6|ft}}
|
|-
|-
| <code>to(-)</code>
| <code>to(-)</code>
| <code><nowiki>{{convert|3|to(-)|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|to(-)|6|ft}}</nowiki></code>
| {{convert|3|to(-)|6|ft}}
| {{convert|3|to(-)|6|ft}}
| rowspan=2 | {{para|abbr|on}} alters the punctuation
| rowspan=2 | {{para|abbr|on}} abbreviates the first unit
|-
|-
| <code>to(-)&#x7c;abbr=on</code>
| <code>to(-)&#x7c;abbr=on</code>
Line 54: Line 52:
| <code><nowiki>{{convert|3|to&nbsp;about|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|to&nbsp;about|6|ft}}</nowiki></code>
| {{nowrap|{{convert|3|to about|6|ft}}}}
| {{nowrap|{{convert|3|to about|6|ft}}}}
|
|-
|-
| <code>+/-</code>
| <code>+/-</code>
| <code><nowiki>{{convert|3|+/-|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|+/-|6|ft}}</nowiki></code>
| {{convert|3|+/-|6|ft}}
| {{convert|3|+/-|6|ft}}
| rowspan=2 | uses "<code>&amp;nbsp;±&amp;nbsp;</code>"
|
|-
|-
| {{hidden sort key|1=+/-}}<code>±</code>&nbsp;<code>&amp;plusmn;</code>
| data-sort-value="+/-" | <code>±</code>&nbsp;<code>&amp;plusmn;</code>
| <code><nowiki>{{convert|3|±|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|±|6|ft}}</nowiki></code>
| {{convert|3|±|6|ft}}
| {{convert|3|±|6|ft}}
|
|-
|-
| <code>+</code>
| <code>+</code>
| <code><nowiki>{{convert|3|+|6|ft}}</nowiki></code>
| <code><nowiki>{{convert|3|+|6|ft}}</nowiki></code>
| {{convert|3|+|6|ft}}
| {{convert|3|+|6|ft}}
|
|-
|-
| <code>,</code>
| <code>,</code>
| <code><nowiki>{{convert|3|,|6|ft}}</nowiki></code> || {{convert|3|,|6|ft}} || uses "<code>,&amp;nbsp;</code>"
| <code><nowiki>{{convert|3|,|6|ft}}</nowiki></code>
| {{convert|3|,|6|ft}}
|
|-
|-
| <code>, and</code>
| <code>, and</code>
| <code><nowiki>{{convert|3|, and|6|ft}}</nowiki></code> || {{nowrap|{{convert|3|, and|6|ft}}}}
| <code><nowiki>{{convert|3|, and|6|ft}}</nowiki></code>
| {{nowrap|{{convert|3|, and|6|ft}}}}
|
|-
|-
| <code>, or</code>
| <code>, or</code>
| <code><nowiki>{{convert|3|, or|6|ft}}</nowiki></code> || {{convert|3|, or|6|ft}}
| <code><nowiki>{{convert|3|, or|6|ft}}</nowiki></code>
| {{convert|3|, or|6|ft}}
|
|-
|-
| <code>by</code>
| <code>by</code>
| <code><nowiki>{{convert|3|by|6|ft}}</nowiki></code> || {{convert|3|by|6|ft}}
| <code><nowiki>{{convert|3|by|6|ft}}</nowiki></code>
| {{convert|3|by|6|ft}}
|
|-
|-
| <code>x</code>
| <code>x</code>
| <code><nowiki>{{convert|3|x|6|ft}}</nowiki></code> || {{convert|3|x|6|ft}} ||  
| <code><nowiki>{{convert|3|x|6|ft}}</nowiki></code>
uses "<code>&nbsp;<nowiki>×&amp;nbsp;</nowiki></code>"
| {{convert|3|x|6|ft}}
| rowspan=3 | {{para|abbr|on}} abbreviates ''and repeats'' the first unit
|-
|-
| <code>&times;</code>&nbsp;<code>&amp;times;</code>
| <code>&times;</code>&nbsp;<code>&amp;times;</code>
| <code><nowiki>{{convert|3|&times;|6|ft}}</nowiki></code> || {{convert|3|x|6|ft}} ||
| <code><nowiki>{{convert|3|&times;|6|ft}}</nowiki></code>
uses "<code>&nbsp;<nowiki>×&amp;nbsp;</nowiki></code>"
| {{convert|3|&times;|6|ft}}
|-
|-
| <code>x&#x7c;abbr=on</code>
| <code>x&#x7c;abbr=on</code>
| <code><nowiki>{{convert|3|x|6|ft|abbr=on}}</nowiki></code> || {{convert|3|x|6|ft|abbr=on}}  
| <code><nowiki>{{convert|3|x|6|ft|abbr=on}}</nowiki></code>
| Scientific notation.<br/>{{para|abbr|on}} alters the punctuation
| {{convert|3|x|6|ft|abbr=on}}  
|- class="sortbottom"
|- class="sortbottom"<!--deprecated-->
| <code>xx</code>
| <code>xx</code>
| colspan=3 | {{!xt|&#x7c;xx&#x7c;}} is '''deprecated'''. Use {{xt|&#x7c;x&#x7c;}} instead
| colspan=3 | {{!xt|1=&#x7c;xx&#x7c;}} is '''deprecated'''. Use {{xt|1=&#x7c;x&#x7c;}} instead
|- class="sortbottom"
|- class="sortbottom"<!--deprecated-->
| <code>*</code>
| <code>*</code>
| colspan=3 | {{!xt|&#x7c;*&#x7c;}} is '''deprecated'''. Use {{xt|&#x7c;x&#x7c;}} instead
| colspan=3 | {{!xt|1=&#x7c;*&#x7c;}} is '''deprecated'''. Use {{xt|1=&#x7c;x&#x7c;}} instead
|}
|}<!--
<noinclude>
{{documentation}}
 
==Later more==
The following ranges provide different output when units are abbreviated.
 
{| <code>class="wikitable"
! Convert !! Output
|-
| <code><nowiki>{{convert|3|and(-)|6|ft|abbr=on}}</nowiki></code> || {{convert|3|and(-)|6|ft|abbr=on}}
|-
| <code><nowiki>{{convert|3|to(-)|6|ft|abbr=on}}</nowiki></code> || {{convert|3|to(-)|6|ft|abbr=on}}
|-
| <code><nowiki>{{convert|3|x|6|ft|abbr=on}}</nowiki></code> || {{convert|3|x|6|ft|abbr=on}}
|}
 
Ranges can use more than two values.
 
{| <code>class="wikitable"
! Convert !! Output
|-
| <code><nowiki>{{convert|3|x|4|x|24|in}}</nowiki></code> || {{convert|3|x|4|x|24|in}}
|-
| <code><nowiki>{{convert|3|x|4|to|6+1/2|x|8+3/4|in}}</nowiki></code> || {{convert|3|x|4|to|6+1/2|x|8+3/4|in}}
|}
 
Ranges can be specified in the first parameter.
 
{| <code>class="wikitable"
! Convert !! Output
|-
| <code><nowiki>{{convert|3.2-7.5|ha}}</nowiki></code> || {{convert|3.2-7.5|ha}}
|-
| <code><nowiki>{{convert|3x4x24|in}}</nowiki></code> || {{convert|3x4x24|in}}
|}
 
;From module:convert/text
range_words = { '+/-', 'to(-)', 'xx', 'x', '*', 'to', 'or', 'by', '–' , '-' }
So:
* {{convert|1+/-2|m|ft}}
* to(-) {{convert|1to(-)2|m|ft}}
* to(-) a {{convert|1to(-)2|m|ft|abbr=on}}
* and(-) {{convert|1and(-)2|m|ft}}
* {{convert|1xx2|m|ft}}
* {{convert|1x2|m|ft}}
* a {{convert|1x2|m|ft|abbr=on}}
* {{convert|1to2|m|ft}}
* {{convert|1or2|m|ft}}
* {{convert|1by2|m|ft}}
* {{convert|1–2|m|ft}}
* {{convert|1-2|m|ft}}
* {{convert|1|-|2|m|ft}}
 


</noinclude>
--<noinclude>{{documentation}}</noinclude>

Latest revision as of 01:06, 3 September 2020

Separator Convert Result Notes
- {{convert|3|-|6|ft}} 3–6 feet (0.91–1.83 m) Input can be hyphen (-) or en dash (–), output uses en dash
 &ndash; (en dash) {{convert|3|–|6|ft}} 3–6 feet (0.91–1.83 m)
and {{convert|3|and|6|ft}} 3 and 6 feet (0.91 and 1.83 m)
and(-) {{convert|3|and(-)|6|ft}} 3 and 6 feet (0.91–1.83 m) |abbr=on abbreviates the first unit
and(-)|abbr=on {{convert|3|and(-)|6|ft|abbr=on}} 3 and 6 ft (0.91–1.83 m)
or {{convert|3|or|6|ft}} 3 or 6 feet (0.91 or 1.83 m)
to {{convert|3|to|6|ft}} 3 to 6 feet (0.91 to 1.83 m)
to(-) {{convert|3|to(-)|6|ft}} 3 to 6 feet (0.91–1.83 m) |abbr=on abbreviates the first unit
to(-)|abbr=on {{convert|3|to(-)|6|ft|abbr=on}} 3 to 6 ft (0.91–1.83 m)
to about {{convert|3|to about|6|ft}} 3 to about 6 feet (0.91 to about 1.83 m)
+/- {{convert|3|+/-|6|ft}} 3 ± 6 feet (0.91 ± 1.83 m)
± &plusmn; {{convert|3|±|6|ft}} 3 ± 6 feet (0.91 ± 1.83 m)
+ {{convert|3|+|6|ft}} 3 + 6 feet (0.91 + 1.83 m)
, {{convert|3|,|6|ft}} 3, 6 feet (0.91, 1.83 m)
, and {{convert|3|, and|6|ft}} 3, and 6 feet (0.91, and 1.83 m)
, or {{convert|3|, or|6|ft}} 3, or 6 feet (0.91, or 1.83 m)
by {{convert|3|by|6|ft}} 3 by 6 feet (0.91 by 1.83 m)
x {{convert|3|x|6|ft}} 3 by 6 feet (0.91 m × 1.83 m) |abbr=on abbreviates and repeats the first unit
× &times; {{convert|3|×|6|ft}} 3 by 6 feet (0.91 m × 1.83 m)
x|abbr=on {{convert|3|x|6|ft|abbr=on}} 3 ft × 6 ft (0.91 m × 1.83 m)
xx |xx| is deprecated. Use |x| instead
* |*| is deprecated. Use |x| instead