Jump to content

Template:Countdown: Difference between revisions

From Detective Conan Wiki
BOBO (talk | contribs)
No edit summary
BOBO (talk | contribs)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="countdown-container">'''{{#expr: floor(({{#time:U|{{{1}}}}} - {{#time:U}}) / 86400)}}''' {{#ifeq: {{#expr: floor(({{#time:U|{{{1}}}}} - {{#time:U}}) / 86400)}} | 1 | day | days }}</div></includeonly>
<includeonly>{{#ifeq: {{#expr: ceil(({{#time:U|{{{1}}}}} - {{#time:U}}) / 86400)}} | -0 | <big>{{orange|'''TODAY!!!'''}}</big> | {{#ifeq: {{#expr: ceil(({{#time:U|{{{1}}}}} - {{#time:U}}) / 86400)}} | 1 | In '''{{#expr: ceil(({{#time:U|{{{1}}}}} - {{#time:U}}) / 86400)}}''' day | In '''{{#expr: ceil(({{#time:U|{{{1}}}}} - {{#time:U}}) / 86400)}}''' days }} }}</includeonly><noinclude>{{Documentation}}Displays the offset of the date parameter inserted into the template from the current time (UTC), given in the number of days.
<noinclude>Displays the offset of the date parameter inserted into the template from the current time (UTC), given in the number of days.
<pre>{{Countdown|December 31, 2100}}</pre>
<pre>{{Countdown|December 31, 2100}}</pre>
Results in {{Countdown|December 31, 2100}}
 
<!--NOTE: It does not round the calculated value but removes the real part; if there are '''1.4''' days remaining, it returns '''1'''.-->
Results in <br> {{Countdown|December 31, 2100}}
 
<!--NOTE: If there are '''1.4''' days remaining, it returns '''2''' days &c.-->


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 19:52, 17 January 2025

Documentation icon Template documentation[create]

Displays the offset of the date parameter inserted into the template from the current time (UTC), given in the number of days.

{{Countdown|December 31, 2100}}

Results in
In 27230 days