Difference between revisions of "Template:Delayed/doc"

From blackwiki
Jump to navigation Jump to search
imported>Kri
(Added example with todays date)
imported>Sardanaphalus
(category)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
 
 
*'''Syntax''': <code>&#123;{delayed | future date/time | text to show after expiration | text to show before expiration}&#125;</code>
 
*'''Syntax''': <code>&#123;{delayed | future date/time | text to show after expiration | text to show before expiration}&#125;</code>
 
** Text to show before/after may be omitted, but the date/time stamp must be given.
 
** Text to show before/after may be omitted, but the date/time stamp must be given.
Line 9: Line 9:
 
** <code>&#123;{delayed|{{#time:Y-m-d|+0 days}}|foo|bar}&#125;</code> displays <code>{{delayed|{{#time:Y-m-d|+0 days}}|foo|bar}}</code> (today's date)
 
** <code>&#123;{delayed|{{#time:Y-m-d|+0 days}}|foo|bar}&#125;</code> displays <code>{{delayed|{{#time:Y-m-d|+0 days}}|foo|bar}}</code> (today's date)
 
** <code>&#123;{delayed|{{#time:Y-m-d|+2 days}}|foo|bar}&#125;</code> displays <code>bar</code>
 
** <code>&#123;{delayed|{{#time:Y-m-d|+2 days}}|foo|bar}&#125;</code> displays <code>bar</code>
** <code>&#123;{delayed|{{#time:Y-m-d|+5 days}}|2=&#123;{db-talk}&#125;}&#125;</code> displays nothing now, but will transclude {{tl|db-talk}} 5 days from now.<includeonly>
+
** <code>&#123;{delayed|{{#time:Y-m-d|+5 days}}|2=&#123;{db-talk}&#125;}&#125;</code> displays nothing now, but will transclude {{tl|db-talk}} 5 days from now.
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
 
 
  
 +
<includeonly>
 +
[[Category:Time, date and calendar templates]]
 
</includeonly>
 
</includeonly>

Revision as of 20:48, 16 November 2014

  • Syntax: {{delayed | future date/time | text to show after expiration | text to show before expiration}}
    • Text to show before/after may be omitted, but the date/time stamp must be given.
    • Date/timestamp is in any format accepted by the {{#date}} ParserFunction, such as YYYY-MM-DD HH:MM.
  • Examples
    • {{delayed|2026-03-28|foo|bar}} displays foo
    • {{delayed|2026-03-30|foo|bar}} displays foo (today's date)
    • {{delayed|2026-04-01|foo|bar}} displays bar
    • {{delayed|2026-04-04|2={{db-talk}}}} displays nothing now, but will transclude {{db-talk}} 5 days from now.