Difference between revisions of "Template:Day Countdown"
Jump to navigation
Jump to search
imported>Wei4Green (lowercase "days to go") |
imported>Debresser (I feel there is a bit of space missing here.) |
||
| Line 11: | Line 11: | ||
|style="text-align:center;font-size:400%;line-height:100%"|{{#invoke:Namespace detect|main|main=|other='''{{#ifexpr: ( {{#time:U}} - {{#time:U|{{{year}}}-{{{month}}}-{{{day}}} -{{{utc_offset}}}}} ) < 0 | |style="text-align:center;font-size:400%;line-height:100%"|{{#invoke:Namespace detect|main|main=|other='''{{#ifexpr: ( {{#time:U}} - {{#time:U|{{{year}}}-{{{month}}}-{{{day}}} -{{{utc_offset}}}}} ) < 0 | ||
|<!-- Before the Opening Day --> | |<!-- Before the Opening Day --> | ||
| − | <span style="font-size:0.3em"></span><span style="color: #dc5b37;">{{#expr: -( {{#time:U}} - {{#time:U|{{{year}}}-{{{month}}}-{{{day}}} -{{{utc_offset}}}}} ) / 86400 +0.5 round 0}}</span><span style="font-size:0.3em">days to go</span> | + | <span style="font-size:0.3em"></span><span style="color: #dc5b37;">{{#expr: -( {{#time:U}} - {{#time:U|{{{year}}}-{{{month}}}-{{{day}}} -{{{utc_offset}}}}} ) / 86400 +0.5 round 0}}</span><span style="font-size:0.3em"> days to go</span> |
|<!-- Not before the Opening Day --> | |<!-- Not before the Opening Day --> | ||
{{#ifexpr: ( {{#time:U}} - {{#time:U|{{{year}}}-{{{month}}}-{{{day}}} -{{{utc_offset}}}}} - 86400 ) < 0 | {{#ifexpr: ( {{#time:U}} - {{#time:U|{{{year}}}-{{{month}}}-{{{day}}} -{{{utc_offset}}}}} - 86400 ) < 0 | ||
Revision as of 13:41, 2 June 2020
This is a countdown template,Using Help:Time function will make it accurate by one second. As with {{Countdown}}, this template should not be used in articles.
Accuracy
This template is use for day countdown,and has an accuracy of 1 second.
Usage
All purpose
{{Day Countdown
|name=
|address=
|logo= (optional)
|year = 2016
|month= 01
|day = 01
|utc_offset = 0 hours
|on_day_text = Begin (optional)
|over_day_text = End (optional)
}}
Future
| Opening Ceremony of the 2020 Summer Olympics |
| Tokyo, Japan – 24-07-2020 |
| End |
| Local Time (Script error: No such module "Purge".) |
{{Day Countdown
|name= Opening Ceremony of the [[2016 Summer Olympics]]
|address= [[Rio de Janeiro]], [[Brazil]]
|year = 2016
|month= 08
|day = 05
|utc_offset = -3 hours
}}
On day
| Today's Event |
| Current Location – 26-06-2026 |
| Begin |
| Local Time (Script error: No such module "Purge".) |
{{Day Countdown
|name=Today's Event
|address=Current Location</nowiki>
|year = {{#time:Y}}
|month= {{#time:m}}
|day = {{#time:d}}
|utc_offset = 0 hours
}}
Past
| Opening Ceremony of the 2008 Summer Olympics |
| Beijing, China – 08-08-2008 |
| End |
| Local Time (Script error: No such module "Purge".) |
{{Day Countdown
|name= Opening Ceremony of the [[2008 Summer Olympics]]
|address= [[Beijing]], [[China]]
|year = 2008
|month= 08
|day = 08
|utc_offset = +8 hours
}}
See also
| The above documentation is transcluded from Template:Day Countdown/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |