Difference between revisions of "Template:Countdown/sandbox"

From Detective Conan Wiki
m (More indenting)
(Taking the number of days out of the if-true and if-false; removed previous debugging test)
Line 1: Line 1:
 
<includeonly><div class="countdown-container">
 
<includeonly><div class="countdown-container">
 
<!-- Debugging -->
 
<!-- Debugging -->
UTC offset is {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}}<br> <!-- Checks if 0 is the result of the utc-offset being left blank -->
+
<!-- No active debugging tests -->
 +
 
 +
'''{{#expr: ceil(({{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - ({{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600)}}) / 86400)}}'''
  
 
{{#ifeq:
 
{{#ifeq:
Line 8: Line 10:
 
         {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600
 
         {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600
 
       )}}
 
       )}}
   ) / 86400)}}
+
   ) / 86400)}} | 1
| 1
+
  | day
| '''{{#expr: ceil((
+
   | days
      {{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - (
 
        {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600
 
      )}}
 
   ) / 86400)}}''' day
 
| '''{{#expr: ceil((
 
      {{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - (
 
        {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600
 
      )}}
 
  ) / 86400)}}''' days
 
 
}}
 
}}
 
</div><!-- Need to figure out how to add optional parameters--></includeonly>
 
</div><!-- Need to figure out how to add optional parameters--></includeonly>

Revision as of 03:36, 1 January 2025