Difference between revisions of "Template:Countdown/sandbox"
From Detective Conan Wiki
m |
(Added debug section in code) |
||
Line 1: | Line 1: | ||
<includeonly><div class="countdown-container"> | <includeonly><div class="countdown-container"> | ||
+ | <!-- Debugging --> | ||
+ | {{#debug: UTC offset is {{{utc-offset|0}}}}} <!-- Checks if 0 is the result of the utc-offset being left blank --> | ||
+ | |||
{{#ifeq: | {{#ifeq: | ||
{{#expr: ceil(({{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - ({{{utc-offset|0}}} * 3600)}}) / 86400)}} | 1 | | {{#expr: ceil(({{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - ({{{utc-offset|0}}} * 3600)}}) / 86400)}} | 1 | |