Difference between revisions of "Template: Date"

From A Wiki of Ice and Fire
Jump to: navigation, search
m (or better)
(quick test. will revert in a few minutes.)
(Tag: Replaced)
 
(39 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{1|}}} |[[Years after Aegon's Landing#Year {{{1}}} after Aegon's Landing|{{{1}}} {{#if:{{{2|}}}| |AL}}]]<!--
+
<includeonly>{{#invoke:Date|main}}</includeonly><noinclude>{{documentation}}</noinclude>
                          -->{{#if:{{{2|}}}| - <!--
 
                          -->[[Years after Aegon's Landing#Year {{{2}}} after Aegon's Landing|{{{2}}}]] AL}} }}</includeonly><noinclude>
 
 
 
This template will create a link to [[Years after Aegon's Landing]] page and the relevant section inside. It should speed up the editing process and make the text more readable when editing.
 
 
 
===Example use:===
 
* <code><nowiki>{{Date|#}}</nowiki></code> - where # , denotes the number of the year, ranging from 1 to 301(as of now)
 
* <code><nowiki>{{Date|from #| to #}} </nowiki></code>
 
 
 
Alternatively you can create the link manually like this: <code><nowiki>[[Years after Aegon's Landing#Year 233 after Aegon's Landing|233 AL]]</nowiki></code>
 
 
 
===See also===
 
* [[Help:Links]]
 
 
 
[[Category:Templates]]</noinclude>
 

Latest revision as of 11:47, 7 June 2019

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

This template links to a year's relevant article. It should speed up the editing process and make the text more readable when editing.

This template first tries to link to a year's dedicated article (e.g. 300 AC), but if that article doesn't exist the template links to the relevant section of either Years after Aegon's Conquest or Years before Aegon's Conquest.

Usage

One year

{{Date|#}} where # denotes the number of the year. Years before Aegon's Conquest must be prefixed with a negative sign -.

For example, {{Date|300}} results in "300 AC", but {{Date|-300}} results in "300 BC".

Two years

{{Date|from #|to #}}

When two years are given, the template returns a range.

For example, {{Date|283|298}} results in "283298 AC", and {{Date|-283|298}} results in "283 BC – 298 AC".

As a special case, if the second argument is + the range spans up to the present. Example: {{Date|200|+}} results in "200 AC – Present".