Difference between revisions of "Template:Countdown/sandbox"

From Detective Conan Wiki
m (Testing floor function)
m
 
(19 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
<!-- Days -->
 
<!-- Days -->
'''{{#expr: floor(({{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - ({{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600)}}) / 86400)}}'''
+
'''{{#expr:
 
+
  ceil(
'''{{#expr: ceil(({{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - ({{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600)}}) / 86400)}}'''
+
      {{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
 
   | day
 
   | days
 
   | days
 
}}
 
}}
</div><!-- Need to figure out how to add optional parameters--></includeonly>
+
</div></includeonly>

Latest revision as of 22:21, 1 January 2025