ढाँचा:Show by date
अभिव्यक्ति त्रुटि र आकस्मिक संचालन <
Usage
सम्पादनThis template will automatically display one of two statements based on whether a particular date has been reached or not.
{{show by date|year|month|day|text before|text after|hour=}}
- 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 thetext 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 thetext before
needs to be displayed until the specified date - The hour parameter (
hour=
) is an optional parameter that sets the hour of the day in Wikipedia time (UTC) that the template will begin showing thetext after
. If not specified, it defaults to 0 (midnight UTC). When set to the offset between local time and UTC (for example -8 for Pacific Standard Time) it will cause the template to showtext after
at midnight local time.
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 अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।" to "Mr. Smith took office on 1 January अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।" 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 अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।" does not usually support a statement "The movie was released on 1 January अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।" since movie dates often slip; on the other hand, it could support "The movie was scheduled for release on 1 January अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।" 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
सम्पादन- Unless the
hour=
is set, 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 डिसेम्बर २२ at 8:00 pm Pacific Standard Time (UTC−08:00) corresponds to 04:00, ढाँचा:Tomorrow (UTC).To work around this, set the
hour=
parameter to the offset between local time and UTC (for example -8 for Pacific Standard Time) or to the UTC time of the actual start of the event. - 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 thetext 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
ortext after
contains an "=" or "|" character that is not inside another template invocation, use the templates {{=}} or {{!}}.
Examples
सम्पादनCode | Result |
---|---|
{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|||Show this before अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|Show this after अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।}} has started | अभिव्यक्ति त्रुटि र आकस्मिक संचालन < has started |
{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|09||Show this before September अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|Show this after September अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।}} has started | अभिव्यक्ति त्रुटि र आकस्मिक संचालन < has started |
{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|09|06|Show this before 06 Sep अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|Show this as of 06 Sep अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।}} | अभिव्यक्ति त्रुटि र आकस्मिक संचालन < |
{{show by date|२०२४|१२|२२|Show this before अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।:00 UTC|Show this as of अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।:00 UTC|hour=अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।}} | अभिव्यक्ति त्रुटि र आकस्मिक संचालन < |
{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|09|06|Show this before 06 Sep अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|}} | अभिव्यक्ति त्रुटि र आकस्मिक संचालन < |
{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|09|06||Show this after 06 Sep अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।}} | अभिव्यक्ति त्रुटि र आकस्मिक संचालन < |
{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|||{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|||Show this before अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।|Show this between अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"। and अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।}}|Show this as of अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।}} | अभिव्यक्ति त्रुटि र आकस्मिक संचालन < |
Note *{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।||| lost spacing }}*, and *{{show by date|अभिव्यक्ति त्रुटि: नपछड्याको विराम चिन्ह चरित्र "२"।||| workaround }}* | Note *अभिव्यक्ति त्रुटि र आकस्मिक संचालन <*, and *अभिव्यक्ति त्रुटि र आकस्मिक संचालन <* |
Template data
सम्पादनThis template will automatically display one of two statements based on whether a particular date has been reached or not. ##### param 1 is the year ##### param 2 is the month number ##### param 3 is the day of the month ##### param 4 is the text to show before the specified date ##### param 5 is the text to show on or after the specified date ##### hour is the hour of the day in 24-hour UTC time
मापदण्ड | विवरण | प्रकार | स्थिति | |
---|---|---|---|---|
year | 1 | कुनैपनि विवरण छैन | अज्ञात | आवश्यक |
month | 2 | Month number | अज्ञात | सुझावित |
day | 3 | Day of the month. | अज्ञात | सुझावित |
Text before | 4 | Text that will be shown before the specified date. | अज्ञात | सुझावित |
Text after | 5 | Text that will be shown on and after the specified date. | अज्ञात | सुझावित |
Hour | hour | Hour of the day in 24-hour UTC time | अज्ञात | वैकल्पिक |
Related templates
सम्पादन- {{Show by}} A similar template that accepts a date/time string instead of separate parameters for the year, month, and day
- {{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 update maintenance tag when a specified date is reached.