No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{{{#ifeq:{{</includeonly><includeonly>subst:</includeonly><includeonly>void}}|{{void}}|{{#ifeq:{{NAMESPACE}}|Template|void|Echo}}|void}}|1=<span style="font-size:large; color:red;">'''<nowiki>{{</nowiki>date<nowiki>}}</nowiki> must not be [[Wikipedia:Template substitution|substituted]]. Use <span style="color:green;"><nowiki>{{subst:</nowiki>[[Template:today|today]]<nowiki>}}</nowiki></span> instead.'''</span>}}<includeonly><span class="wpAutoDate">{{#time:{{#ifeq:{{#time:Y|{{{1|einval}}} 2000}}|{{#time:Y|{{{1|einval}}} 2001}}|j F Y|j F}}|{{{1|einval}}} }}<!-- --></span></includeonly><noinclude> | <includeonly>{{{{#ifeq:{{</includeonly><includeonly>subst:</includeonly><includeonly>void}}|{{void}}|{{#ifeq:{{NAMESPACE}}|Template|void|Echo}}|void}}|1=<span style="font-size:large; color:red;">'''<nowiki>{{</nowiki>date<nowiki>}}</nowiki> must not be [[Wikipedia:Template substitution|substituted]]. Use <span style="color:green;"><nowiki>{{subst:</nowiki>[[Template:today|today]]<nowiki>}}</nowiki></span> instead.'''</span>}}<includeonly><span class="wpAutoDate">{{#time:{{#ifeq:{{#time:Y|{{{1|einval}}} 2000}}|{{#time:Y|{{{1|einval}}} 2001}}|j F Y|j F}}|{{{1|einval}}} }}<!-- --></span></includeonly><noinclude> | ||
<!-- | |||
<!-- THE FOLLOWING COMMENT MAY NOT APPLY - there's a whole #iferror chunk that wwoods removed. --> | |||
<!-- | |||
** The reformatting stuff is temporary and pending resolution of bug #4582. | ** The reformatting stuff is temporary and pending resolution of bug #4582. | ||
** It would not have been necessary at the moment either if someone didn't | ** It would not have been necessary at the moment either if someone didn't | ||
Line 6: | Line 8: | ||
** A handler for wpAutoDate is in the works. PLEASE BE PATIENT. | ** A handler for wpAutoDate is in the works. PLEASE BE PATIENT. | ||
--> | --> | ||
{{ | |||
{{Date/doc}} | |||
<!-- Add cats and interwikis to the /doc subpage, not here! --> | <!-- Add cats and interwikis to the /doc subpage, not here! --> | ||
<!-- This template is from Wikipedia and thus licensed under the GFDL. --> | <!-- This template is from Wikipedia and thus licensed under the GFDL. --> | ||
</noinclude> | </noinclude> |
Latest revision as of 20:30, 4 June 2008
17 August 2024
Usage
- {{date|<some date>}} causes <some date> to be dynamically reformatted according to reformatting rules.*
- When no <date> parameter is specified, it displays the current date, which changes to tomorrow's date when you view it tomorrow, and so on. Again, the date is subject to reformatting rules.*
This template cannot be substituted. To fix today's date use {{subst:today}}, which will emit {{date|2024-08-17}} and so wrap the date for further processing by {{date}}.
* Reformatting would ideally occur according to a user's date-style preferences, or using some sane and human-friendly default when a user is not-logged-in or when no date-style preference has been set. However, this functionality (not to be confused with wikilinking of dates) is disabled pending resolution of bug #4582. In the meanwhile, {{date}} will display dates in 'day month year' format (e.g. 17 August 2024) for dates between 1970 and 2038. Dates between 1901 and 1969 will be displayed incorrectly (see bugzilla:11686). Dates outside these ranges should appear unadjusted.
Examples
- With no <date> parameter:
- {{date}} appears as 17 August 2024
- <date>s with a year:
- <date>s without a year:
See also