Skip to content

Commit

Permalink
sixths: only display times when set/rise is close
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelmachek committed Oct 17, 2024
1 parent f41fc9c commit 039166d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/sixths/sixths.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 039166d

Please sign in to comment.