Difference between revisions of "Template:Date"
From LGPedia
m (gah, getting there...) |
(fix categorization issue) |
||
Line 17: | Line 17: | ||
| 3 | 23 = rd | | 3 | 23 = rd | ||
| #default = th | | #default = th | ||
− | }}, {{{1|{{CURRENTYEAR}}}}}{{#if: {{{cat|}}} | <includeonly>[[Category:{{{cat}}}|{{{1|{{CURRENTYEAR}}}}} {{{2|{{CURRENTMONTH}}}}} {{{3|{{CURRENTDAY}}}}}]]</includeonly>}}<noinclude> | + | }}, {{{1|{{CURRENTYEAR}}}}}{{#if: {{{cat|}}} | <includeonly>[[Category:{{{cat}}}|{{{1|{{CURRENTYEAR}}}}} {{#switch: {{{2|{{CURRENTMONTH}}}}} |
+ | | 1 | Jan | January = 01 | ||
+ | | 2 | Feb | February = 02 | ||
+ | | 3 | Mar | March = 03 | ||
+ | | 4 | Apr | April = 04 | ||
+ | | 5 | May = 05 | ||
+ | | 6 | Jun | June = 06 | ||
+ | | 7 | Jul | July = 07 | ||
+ | | 8 | Aug | August = 08 | ||
+ | | 9 | Sep | September = 09 | ||
+ | | 10 | Oct | October = 10 | ||
+ | | 11 | Nov | November = 11 | ||
+ | | 12 | Dec | December = 12 | ||
+ | }} {{{3|{{CURRENTDAY}}}}}]]</includeonly>}}<noinclude> | ||
==Usage== | ==Usage== | ||
<pre>{{date|YEAR|MONTH|DAY|cat=CATEGORY}}</pre> | <pre>{{date|YEAR|MONTH|DAY|cat=CATEGORY}}</pre> | ||
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. | 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:38, 26 February 2008
April 25th, 2024
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.