Template:SpecDate/doc: Difference between revisions

From RabastorWiki
Jump to navigation Jump to search
(Created page with "==Usage== Edit the subpages for day, month, and year to maintain correct date here and in templates. The "ref" p...")
 
No edit summary
Line 1: Line 1:
==Usage==
<noinclude>==Usage==
Edit the subpages for [[Template:SpecDay|day]], [[Template:SpecMth|month]], and [[Template:SpecYr|year]] to maintain correct date here and in templates.
Edit the subpages for [[Template:SpecDay|day]], [[Template:SpecMth|month]], and [[Template:SpecYr|year]] to maintain correct date here and in templates.


The "ref" parameter passed should be parsed by the switch function to return the correct values for day, month, and year (corresponding to the start of the referenced event or period).
The "ref" parameter passed should be parsed by the switch function to return the correct values for day, month, and year (corresponding to the start of the referenced event or period). For example, <nowiki>{{SpecDate|AOCAF49}}</nowiki> returns {{SpecDate|AOCAF49}} as this is the corresponding start date of [[AOCAF 49]], as stored in the templates.


For templates, where SpecDate is required, use either full form (SpecDate|ref) or the appropriate formatted version from below:
Where SpecDate is required, use either full form (SpecDate|ref) or the appropriate formatted version from below:
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 18: Line 18:
| yyyy-mm-dd
| yyyy-mm-dd
| {{SpecDate dev}}
| {{SpecDate dev}}
|}
|}</noinclude>

Revision as of 08:52, 23 March 2016

Usage

Edit the subpages for day, month, and year to maintain correct date here and in templates.

The "ref" parameter passed should be parsed by the switch function to return the correct values for day, month, and year (corresponding to the start of the referenced event or period). For example, {{SpecDate|AOCAF49}} returns 14 June, 2224 as this is the corresponding start date of AOCAF 49, as stored in the templates.

Where SpecDate is required, use either full form (SpecDate|ref) or the appropriate formatted version from below:

Subpage Output Format Example
SpecDate short dd/mm/yy 01/09/2230
SpecDate dev yyyy-mm-dd 2230-09-01