Template:Date: Difference between revisions

From LGPedia
Jump to navigationJump to search
No edit summary
more functionality
Line 1: Line 1:
{{#switch: {{{2}}}
{{#switch: {{{2|{{CURRENTMONTH}}}}}
| 1  | Jan | January  = January
| 1  | Jan | January  = January
| 2  | Feb | February  = February
| 2  | Feb | February  = February
Line 12: Line 12:
| 11 | Nov | November  = November
| 11 | Nov | November  = November
| 12 | Dec | December  = December
| 12 | Dec | December  = December
}} {{{3}}}{{#switch: {{{3}}}
}} {{{3|{{CURRENTDAY}}}}}{{#switch: {{{3}}}
| 1 | 21 | 31 = st
| 1 | 21 | 31 = st
| 2 | 22 = nd
| 2 | 22 = nd
| 3 | 23 = rd
| 3 | 23 = rd
| #default = th
| #default = th
}},  
}}, {{{1|{{CURRENTYEAR}}}}}{{#if: {{{cat|}}} <includeonly>[[Category:{{{cat}}}s by date|{{{1|{{CURRENTYEAR}}}}} {{{2|{{CURRENTMONTH}}}}} {{{3|{{CURRENTDAY}}}}}]]</includeonly>}}<noinclude>
{{{1}}}<noinclude>
==Usage==
==Usage==
<pre>{{date|YEAR|MONTH|DAY}}</pre>
<pre>{{date|YEAR|MONTH|DAY|cat=CATEGORY}}</pre>
where YEAR, and DAY are all numerical values and MONTH is either the name of the month, the first three letters of the name, or a numerical value corresponding to the month.
where YEAR, and DAY are both numerical values and MONTH is either the name of the month, the first three letters of the name of the month, or a numerical value corresponding to the month. If a parameter is left out, the current year/month/day will be used instead. The "cat" field is optional, but if provided, the page will be categorized in '''Category:CATEGORY''' and sorted by the date.  
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 06:29, 26 February 2008

August 1th, 2026

Usage

{{date|YEAR|MONTH|DAY|cat=CATEGORY}}

where YEAR, and DAY are both numerical values and MONTH is either the name of the month, the first three letters of the name of the month, or a numerical value corresponding to the month. If a parameter is left out, the current year/month/day will be used instead. The "cat" field is optional, but if provided, the page will be categorized in Category:CATEGORY and sorted by the date.