User:Potentials/TIME
Appearance
This computes the time left in the day.
Time now
[edit]- Time Stamp: 20241125192315
- Hour: 19
- Minute: 23
- Second: 15
Remaining time (Simple but buggy)
[edit]- 4 hours 36 minutes and 45 seconds
Click here to update (Refreshing this page won't do it)
Remaining time (Very complicated but accurate)
[edit]- 4 hours 36 minutes and 45 seconds
Explanation:
Seconds = X
[edit]- 15
Minutes = Y
[edit]- 23
Hours = W
[edit]- 19
Seconds remaining (could be 60) = 60 - X
[edit]- 45
Is it 60 seconds?
[edit]- 1 X!=0?
- 0 X=0?
Seconds remaining corrected
[edit]- 45 (X!=0?)*(60-X)
Minutes intermediately corrected but could be 60 Z = (59 - Y) + (X=0?)
[edit]- 36
Is it 60 minutes?
[edit]- 1 Z!=60?
- 0 Z=60?
Minutes finally corrected V = (Z!=60?)*Z
[edit]- 36
Hours finally corrected U = W + (Z=60?)
[edit]- 4