diff options
-rwxr-xr-x | countdown.hs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/countdown.hs b/countdown.hs index 2a1f654..a7488de 100755 --- a/countdown.hs +++ b/countdown.hs | |||
@@ -289,11 +289,16 @@ countdownWidget showConversion isSimulated t = | |||
289 | countdownBox = | 289 | countdownBox = |
290 | (borderWithLabel (str $ printf "Countdown %d" currentYear) $ | 290 | (borderWithLabel (str $ printf "Countdown %d" currentYear) $ |
291 | vBox $ | 291 | vBox $ |
292 | (str $ printf "Day %d of %d\nSecond %s of %s" | 292 | let secondsNow = 1 + toSeconds yearElapsed :: Int |
293 | dayNum | 293 | secondsTotal = toSeconds yearLength |
294 | numDays | 294 | in |
295 | (commas $ (1 + toSeconds yearElapsed :: Int)) | 295 | (str $ printf "Day %d of %d\nSecond %s of %s\n%s seconds remain" |
296 | (commas $ toSeconds yearLength)) : remains | 296 | dayNum |
297 | numDays | ||
298 | (commas secondsNow) | ||
299 | (commas secondsTotal) | ||
300 | (commas $ secondsTotal - secondsNow) | ||
301 | ) : remains | ||
297 | ) | 302 | ) |
298 | remains = | 303 | remains = |
299 | [ | 304 | [ |