Difference between revisions of "Template:Countdown/sandbox"

From Detective Conan Wiki
m (Incorporating hours)
m
 
(17 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}} - (
+
'''{{#expr:
  {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600)}}) / 86400)}}'''
+
  ceil(
 +
      {{timeDiff|{{{end-date}}}|{{{end-time}}}|{{{utc-offset}}} }} / 86400
 +
  )
 +
}}'''
 
{{#ifeq:
 
{{#ifeq:
   {{#expr: floor((
+
   {{#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
 
  | days
 
}}
 
 
 
<!-- Hours -->
 
'''{{expr: floor((({{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - (
 
  {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600)}})-(86400*floor(({{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - (
 
  {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600)}})/86400)))/3600)}}
 
 
 
{{#ifeq:
 
   {{#expr: floor((
 
      {{#expr: {{#time:U| {{{end-date}}} {{{end-time}}} }} - {{#time:U}} - (
 
        {{#if:{{{utc-offset|}}}|{{{utc-offset}}}|0}} * 3600
 
      )}}
 
  ) / 86400)}} | 1
 
 
   | day
 
   | day
 
   | days
 
   | days
 
}}
 
}}
 
</div></includeonly>
 
</div></includeonly>

Latest revision as of 22:21, 1 January 2025