fix(astrocalc): handle when the moon rise or set don't occur on the current day

pull/3447/head
paul-arg 2024-06-08 17:54:19 +02:00 committed by GitHub
parent 946d72205c
commit 6b9c955dc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -180,8 +180,8 @@ function drawMoonTimesPage(gps, title) {
const moonColor = g.theme.dark ? {r: 1, g: 1, b: 1} : {r: 0, g: 0, b: 0};
const pageData = {
Rise: dateToTimeString(times.rise),
Set: dateToTimeString(times.set),
Rise: times.rise ? dateToTimeString(times.rise) : "Not today",
Set: times.set ? dateToTimeString(times.set) : "Not today",
};
drawData(title, pageData, null, g.getHeight()/2 - Object.keys(pageData).length/2*20 + 5);