Difference between revisions of "Template:Dr-make"

From blackwiki
Jump to navigation Jump to search
imported>Wbm1058
(add an error check)
imported>Wbm1058
(oops, fix last edit)
Line 32: Line 32:
 
     |001={{drep |{{ordinal|{{{1}}}}} millennium| y{{{3|}}} |{{ordinal|{{{1}}}}} millennium}}
 
     |001={{drep |{{ordinal|{{{1}}}}} millennium| y{{{3|}}} |{{ordinal|{{{1}}}}} millennium}}
 
     |000={{drep |{{ordinal|{{{1}}}}} millennium| {{{3|}}} |{{ordinal|{{{1}}}}} millennium}}
 
     |000={{drep |{{ordinal|{{{1}}}}} millennium| {{{3|}}} |{{ordinal|{{{1}}}}} millennium}}
 +
  }}
 
   |#default={{error|[[Template:Dr-make]] parameter {{param|2}} must be y, d, c, or m}}
 
   |#default={{error|[[Template:Dr-make]] parameter {{param|2}} must be y, d, c, or m}}
  }}
 
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
 
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
 
</noinclude>
 
</noinclude>

Revision as of 15:31, 10 July 2019

Template documentation[view] [edit] [history] [purge]

Usage

Produces a representation of a logically-numbered year/decade/century/millennium (first parameter). Second para is y/d/c/m. Representation style depends on the third parameter:

  • (parameter empty or absent): links to the year if it has an article (not a redirect)
  • y: always links
  • n: never links
  • t: produces simple text (no no-break spaces etc.), e.g. for use in category names
  • s: displays AD or BC in small capitals
  • a: adds AD if not BC
  • p: displays AD as prefix (only valid with a)
  • ys, ya, ysa, ns, na, nsa, sa: permitted combinations of above options
  • yap, ysap, nap, nsap, sap: combinations with AD prefix

Used by {{dr}}. Uses {{drep}}.

Examples