Jump to content

User:Potentials/TIME

From Wikipedia, the free encyclopedia

This computes the time left in the day.


Time now

[edit]
  • Time Stamp: 20241125173930
  • Hour: 17
  • Minute: 39
  • Second: 30

Remaining time (Simple but buggy)

[edit]
  • 6 hours 20 minutes and 30 seconds

Click here to update (Refreshing this page won't do it)

Remaining time (Very complicated but accurate)

[edit]
  • 6 hours 20 minutes and 30 seconds

Explanation:

Seconds = X

[edit]
  • 30

Minutes = Y

[edit]
  • 39

Hours = W

[edit]
  • 17

Seconds remaining (could be 60) = 60 - X

[edit]
  • 30

Is it 60 seconds?

[edit]
  • 1 X!=0?
  • 0 X=0?

Seconds remaining corrected

[edit]
  • 30 (X!=0?)*(60-X)

Minutes intermediately corrected but could be 60 Z = (59 - Y) + (X=0?)

[edit]
  • 20

Is it 60 minutes?

[edit]
  • 1 Z!=60?
  • 0 Z=60?

Minutes finally corrected V = (Z!=60?)*Z

[edit]
  • 20

Hours finally corrected U = W + (Z=60?)

[edit]
  • 6
[edit]