From 039166daa91a65508ff448847d17dbc926964548 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sun, 13 Oct 2024 21:07:48 +0200 Subject: [PATCH] sixths: only display times when set/rise is close --- apps/sixths/sixths.app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/sixths/sixths.app.js b/apps/sixths/sixths.app.js index 00352a44cde..671ffcc67c1 100644 --- a/apps/sixths/sixths.app.js +++ b/apps/sixths/sixths.app.js @@ -224,7 +224,10 @@ let sun = { let t = this.sunTime(); this.rise = t.sunrise.getTime() / 1000; this.set = t.sunset.getTime() / 1000; + return; } + this.rise = getTime() - 4*3600; + this.set = getTime() + 4*3600; }, // < 0 : next is sunrise, in abs(ret) seconds // > 0 @@ -859,7 +862,7 @@ function draw() { { let set = sun.getNext(); - if (true || (set > -8*60*60 && set < 2*60*60)) { + if ((set > -12*60*60 && set < 4*60*60)) { if (set < 0) { msg += "^"; set = -set;