Alternative History
(Created page with "{{Documentation subpage}} {{lua|Module:String}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> This template creates a en dash...")
Tag: Source edit
 
Tag: Source edit
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
   
 
== Usage ==
 
== Usage ==
{{tlxi|En dash range|''start''|''end''|nolink=yes}}
+
{{tlxi|En dash range|start|end|term_start|term_end|nolink=yes}}
   
 
Examples:
 
Examples:

Latest revision as of 13:55, 21 June 2021

This template creates a en dash-separated range that is compliant with MOS:RANGE. Its main purpose is to automatically determine whether a spaced or unspaced dash is to be used, based on the presence of whitespace, hyphens, or dashes in either term.

Usage

Template:Tlxi

Examples:

  • {{En dash range|2020|2021}}: 2020–2021
  • {{En dash range|1 January 2020|1 January 2021}}: 1 January 2020 – 1 January 2021
  • {{En dash range|1 January 2020|2021}}: 1 January 2020 – 2021
  • {{En dash range|2020|1 January 2021}}: 2020 – 1 January 2021
  • {{En dash range|2020-01-01|2021-01-01}}: 2020-01-01 – 2021-01-01
  • {{En dash range|2020|2021<ref>...</ref>}}: 2020 – 2021Template:Dummy reference