Difference between revisions of "Template:Countdown/sandbox"

From Detective Conan Wiki
m (More indenting)
m
 
(22 intermediate revisions by the same user not shown)
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 -->
  
 +
<!-- Days -->
 +
'''{{#expr:
 +
  ceil(
 +
      {{timeDiff|{{{end-date}}}|{{{end-time}}}|{{{utc-offset}}} }} / 86400
 +
  )
 +
}}'''
 
{{#ifeq:
 
{{#ifeq:
   {{#expr: ceil((
+
   {{#expr:
       {{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - (
+
  ceil(
        {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600
+
       {{timeDiff|{{{end-date}}}|{{{end-time}}}|{{{utc-offset}}} }} / 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></includeonly>

Latest revision as of 22:21, 1 January 2025