Template:Scheduled Show: Difference between revisions

From Hololive Fan Wiki
Content added Content deleted
(now no longer uses Unix timestamps because local time is ignored when using Unix timestamps with #timel)
m (bugfix)
Line 1: Line 1:
<includeonly>{{#ifexpr:{{#timel:xnYmdHis}}<{{#timel:xnYmdHis|{{{1|}}}}}|{{{2|}}}|{{{3|}}}}}</includeonly><noinclude>
<includeonly>{{#ifexpr:{{#timel:xnYmdHis}}<{{#time:xnYmdHis|{{{1|}}}}}|{{{2|}}}|{{{3|}}}}}</includeonly><noinclude>
Use this template to show different content depending on the time and date. The content can be a just single sentence, other templates, an entire section, or even an entire page!<ref>Your mileage may vary. Having multiple tables within the same parameter is known to cause issues. In general, please be mindful when trying to encapsulate large amounts of content in one template.</ref>
Use this template to show different content depending on the time and date. The content can be a just single sentence, other templates, an entire section, or even an entire page!<ref>Your mileage may vary. Having multiple tables within the same parameter is known to cause issues. In general, please be mindful when trying to encapsulate large amounts of content in one template.</ref>
This template uses Japan Standard Time (JST), which is GMT+9.
This template uses Japan Standard Time (JST), which is GMT+9.

Revision as of 16:33, 8 August 2021

Use this template to show different content depending on the time and date. The content can be a just single sentence, other templates, an entire section, or even an entire page![1] This template uses Japan Standard Time (JST), which is GMT+9.

  1. Your mileage may vary. Having multiple tables within the same parameter is known to cause issues. In general, please be mindful when trying to encapsulate large amounts of content in one template.

Usage

{{Scheduled Show|date/time object|A|B}}
  • date/time object: Can be any date/time object accepted MediaWiki's time function.
  • A: Optional. The content you wish to show before the given time
  • B: Optional. The content you wish to show during and after the given time.

Examples

Markup Description
{{Scheduled Show|01 Aug 2021 12:00|A}}
Show content A until 01 Aug 2021 12:00, and then nothing afterwards.
{{Scheduled Show|2021-08-01 12:00||B}}
Do not show content B until 01 Aug 2021 12:00.
{{Scheduled Show|August 01, 2021|A|B}}
Show content A until 01 Aug 2021 00:00, and then content B afterwards.
{{Scheduled Show|20210801|A|{{Scheduled Show|20210901|B|C}}}}
Show content A until 01 Aug 2021 00:00, and then content B until 01 Sep 2021 00:00, and then content C afterwards.

Considerations

Because the MediaWiki software uses extensive caching, your scheduled content will not update immediately upon reaching the scheduled time. If you're impatient, use Special:Purge on the target page to flush the server's cache and force the page to update.