Template:Dr-make: Difference between revisions
Appearance
Content deleted Content added
number params. for improved readability |
all y: 0<y<10001 are linked with a preceding AD, all pages either exist at AD y or are targeted by a redirect at AD y |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch:{{{2}}} |
<includeonly>{{#switch:{{{2}}} |
||
|y={{#switch:{{#expr:{{{1}}}<-729}}{{#expr:{{{1}}}<1}}{{#expr:{{{1}}}< |
|y={{#switch:{{#expr:{{{1}}}<-729}}{{#expr:{{{1}}}<1}}{{#expr:{{{1}}}<1001}}{{#expr:{{{1}}}<2100}} |
||
|1111={{drep |1={{#expr:1-{{{1}}}}} |2={{{3|}}}b }} |
|1111={{drep |1={{#expr:1-{{{1}}}}} |2={{{3|}}}b }} |
||
|0111={{drep |1={{#expr:1-{{{1}}}}} |2=y{{{3|}}}b }} |
|0111={{drep |1={{#expr:1-{{{1}}}}} |2=y{{{3|}}}b }} |
Revision as of 00:57, 8 August 2019
![]() | This template is used on approximately 3,400 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 implementing them. |
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
- {{dr-make|1|y}} 1
- {{dr-make|1|y|n}} 1
- {{dr-make|1|y|t}} 1
- {{dr-make|1|y|a}} AD 1
- {{dr-make|1|y|sa}} AD 1
- {{dr-make|212|y|a}} AD 212
- {{dr-make|212|y|sa}} AD 212
- {{dr-make|212|y|na}} AD 212
- {{dr-make|212|y|nsa}} AD 212
- {{dr-make|212|y|ap}} AD 212
- {{dr-make|212|y|sap}} AD 212
- {{dr-make|212|y|yap}} AD 212
- {{dr-make|911|y}} 911
- {{dr-make|-11|d}} 100s BC
- {{dr-make|-1|d}} 0s BC
- {{dr-make|0|d}} 0s
- {{dr-make|1|d}} 10s
- {{dr-make|10|d}} 100s
- {{dr-make|1|c}} 1st century
- {{dr-make|1|c|a}} 1st century AD
- {{dr-make|10|c}} 10th century
- {{dr-make|1|m}} 1st millennium
- {{dr-make|0|y}} 1 BC
- {{dr-make|0|y|s}} 1 BC
- {{dr-make|-2|y|ysa}} 3 BC