Moon phase fix 2
This commit is contained in:
fraxle
2026-05-27 14:29:01 +01:00
parent 2c0cac5094
commit 6952f0e1c0
2 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -294,7 +294,7 @@ export function confidenceBand(i) {
export function moonPhaseFraction(date) {
const JD = date.getTime() / 86400000 + 2440587.5;
const syn = 29.530588;
const ref = 2451550.2597;
const ref = 2451560.2054;
let p = ((JD - ref) % syn) / syn;
if (p < 0) p += 1;
return p;