మూస:Show by date
Usage
మార్చుThis template will automatically display one of two statements based on whether a particular date has been reached.
{{show by date|year|month|day|text before|text after}}
- Parameters 1, 2, and 3 are the Year, Month, and Day that the template should show the text after. Until that date, the text before is shown. If the day is omitted, the template will activate on the first day of the specified month. If the month is also omitted, the template will activate on 1 January of the specified year. If the year is also omitted, the template will activate immediately.
- Parameter 4 (text before) is the text to be shown if the current date is before the date specified in the previous parameters; it may be left empty if only the text after needs to be displayed at the specified date
- Parameter 5 (text after) is the text to be shown if the current date is on or after the date specified in the previous parameters; it may be left empty if only the text before needs to be displayed until the specified date
The template is particularly useful on low-activity articles where dated statements may not receive prompt attention. A WP:BOT, User:AnomieBOT, will substitute the template with just the text after as the given dates elapse.
Warnings
మార్చు- Be certain that the "before" and "after" versions of the statement are both reliably supported by the cited sources. For example, "Mr. Smith will take office on 1 January 2025" to "Mr. Smith took office on 1 January 2025" are both normally citable to the results of the election or announcement of the appointment. But the source for "The movie is scheduled for release on 1 January 2025" does not usually support a statement "The movie was released on 1 January 2025" since movie dates often slip; on the other hand, it could support "The movie was scheduled for release on 1 January 2025" or the template could be used to remove the text entirely, and {{update after}} could be used to request an update.
- Be careful that the article does not contain awkward grammar before the date and will not contain awkward grammar when the "after" text is displayed.
Limitations
మార్చు- In the current version of the template, statements will be switched on the date according to Wikipedia time (00:00 UTC). If the actual event point is a few hours before or after this, it probably makes little difference in the grander scheme of time. However, it will make a significant difference if the actual event is more than 12 hours before or after this. For example, an event that takes place on నవంబరు 5 at 8:00 pm Pacific Standard Time (UTC−08:00) corresponds to 04:00, నవంబరు 6 (UTC).
Tackling the complexities of a time-sensitive version of this template would be a good future research and development project, though.
- The output of this template will not be changed until the page is purged. MediaWiki may or may not manage to do this automatically. Category membership and the output of Special:WhatLinksHere, if these are changed by the expiration of this template, will not be updated until the page is edited.
- Neither the text before nor the text after may begin or end with whitespace. Workarounds include using an escape code for space (
 
), using a non-breaking space (
), or including invisible markup (e.g.<nowiki/>
) to prevent the spaces from being stripped. - If the text before or text after contains an "=" or "|" character that is not inside another template invocation, use the templates {{=}} or {{!}}.
Examples
మార్చుCode | Result |
---|---|
{{show by date|2011|||Show this before 2011|Show this after 2011}} has started | Show this after 2011 has started |
{{show by date|2012|02||Show this before February 2012|Show this after February 2012}} has started | Show this after February 2012 has started |
{{show by date|2010|09||Show this before September 2010|Show this as of September 2010}} | Show this as of September 2010 |
{{show by date|2010|09|06|Show this before 06 Sep 2010|Show this as of 06 Sep 2010}} | Show this as of 06 Sep 2010 |
{{show by date|2010|09|06|Show this before 06 Sep 2010|}} | |
{{show by date|2010|09|06||Show this as of 06 Sep 2010}} | Show this as of 06 Sep 2010 |
{{show by date|2099|||{{show by date|2010|||Show this before 2010|Show this between 2010 and 2099}}|Show this as of 2099}} | Show this between 2010 and 2099 |
Note *{{show by date|3000|01|01| lost spacing }}*, and *{{show by date|3000|01|01| workaround }}* | Note *lost spacing*, and * workaround * |
Related templates
మార్చు- {{As of}}
- {{Update}}
{{Update|inaccurate=y}}
is used to mark an article whose factual accuracy may be compromised (although this may be disputed) due to out of date information. This template adds the article to Category:Articles with obsolete information.
- {{Update after}}, which shows an inline upate maintenance tag when a specified date is reached.