Template:Date link: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(Created page with "{{#if:{{{2|}}}|{{dl/text|{{{2}}}}}{{dl/set|{{{1}}}|{{{2}}}}}}}<noinclude>Category:Date calculation templatesCategory:Template sandbox</noinclude>")
Tag: sourceedit
 
(Nah, this is about as efficient as it can get with parser functions and string functions. Plus now it's seeing use in new SMW developments. Removing {{TempInUse}}.)
Tag: 2017 source edit
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if:{{{2|}}}|{{dl/text|{{{2}}}}}{{dl/set|{{{1}}}|{{{2}}}}}}}<noinclude>[[Category:Date calculation templates]][[Category:Template sandbox]]</noinclude>
{{#if:{{{1|}}}|{{dl/text|{{{1}}}}}{{dl/set|{{{1}}}|{{{2|}}}}}}}<noinclude>{{documentation}}[[Category:Date link templates]][[Category:Date calculation templates]][[Category:Template sandbox]]</noinclude>

Latest revision as of 22:20, 8 January 2022

Instructions for {{Date link}}

{{date link}}, or {{dl}}, is a template used in infoboxes to autolink date variables. This template is not to be confused with {{d}}, which simply makes a link to a singular date article, like 2008 or 23 November.

Use of the template is very simple.

{{dl|29 November 2024}} (in this instance, the current date) will automatically link to that release date (29 November 2024). It will also set SMW for that page to recognise that release date.

If you do not wish to also call on SMW, please use {{dl/text}} or {{dl/link}}, rather than {{dl}} direct. {{dl/link}} will exclude notes; in all other versions, parentheticals will be retained, and given in small text beside the release date, often, of course, within an infobox. Such an infobox can be seen on the right.

For cover dates[[edit source]]

Ranges[[edit source]]

With notes[[edit source]]

  • {{dl|29 November 2024 (today)}} => 29 November 2024 (today) (SMW: 2024-11-29)
  • {{dl|19 December 1996 (VHS)}} => 19 December 1996 (VHS) (SMW: 1996-12-19)
  • {{dl|8 March 2010 (AudioGO)}} => 8 March 2010 (AudioGO) (SMW: 2010-03-08)
  • {{dl|11 - 14 March 1974 (n)}} => 11 - 14 March 1974 (n) (SMW: 1974-03-11 / end date: 1974-03-14)