Template:Event infobox: Difference between revisions
From Tears of Themis Wiki
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
! Duration | ! Duration | ||
| Approx. {{#expr:ceil(({{#time:xNU | {{{endDate|}}} }} - {{#time:xNU | {{{startDate|}}} }})/60/60/24) }} days | | Approx. {{#expr:ceil(({{#time:xNU | {{{endDate|}}} }} - {{#time:xNU | {{{startDate|}}} }})/60/60/24) }} days | ||
|} | |}{{#if:{{{promoImage2|}}} | <nowiki /> | ||
<div class="promoimage">[[File:{{{promoImage2|}}}{{!}}link=]]</div> }}{{#if: {{{name2|}}} |<nowiki /> | |||
{{{!}} class="wikitable" style="width:100%" | |||
! colspan=2 {{!}} {{{name2|}}} | |||
{{!}}- | |||
! Start Date | |||
{{!}} {{#time:Y-m-d H:i|{{{startDate2|}}} }} UTC +9 | |||
{{!}}- | |||
! End Date | |||
{{!}} {{#time:Y-m-d H:i|{{{endDate2|}}} }} UTC +9 | |||
{{!}}- | |||
! Duration | |||
{{!}} Approx. {{#expr:ceil(({{#time:xNU | {{{endDate2|}}} }} - {{#time:xNU | {{{startDate2|}}} }})/60/60/24) }} days | |||
{{!}}} }} | |||
</div></includeonly> | </div></includeonly> |
Latest revision as of 01:26, 20 February 2023
Description[edit source]
Generates an infobox with event promo image, start date, end date, and duration in a standard format for all event pages.
Usage[edit source]
{{Event infobox |name= |promoImage= |startDate=YYYY-MM-DD HH:MM:SS |endDate=YYYY-MM-DD HH:MM:SS }}
Example[edit source]
{{Event infobox |name=Blizzardous Threads of Red |promoImage=Blizzardous Threads of Red.jpg |startDate=2023-01-12 11:00 |endDate=2023-02-02 04:00 }}
Blizzardous Threads of Red | |
---|---|
Start Date | 2023-01-12 11:00 UTC +9 |
End Date | 2023-02-02 04:00 UTC +9 |
Duration | Approx. 21 days |
Optional banner override[edit source]
In case the template is called via cargo query and the editor would like to override with a different banner image than was used in the event announcement, this can be done by setting the variable "bannerOverride" before calling the template.
{{#vardefine:bannerOverride | Blizzardous Threads of Red banner.png }} {{Event infobox |name=Blizzardous Threads of Red |promoImage=Blizzardous Threads of Red.jpg |startDate=2023-01-12 11:00 |endDate=2023-02-02 04:00 }}
Blizzardous Threads of Red | |
---|---|
Start Date | 2023-01-12 11:00 UTC +9 |
End Date | 2023-02-02 04:00 UTC +9 |
Duration | Approx. 21 days |
The above documentation is transcluded from Template:Event infobox/doc. (edit | history)