SunCalc is one of my first open source projects — made the first commit 15 years ago and it had its share of wonderful uses ever since, but it s been somewhat neglected in recent years. Now that modern AI tools give me the ability to catch up on years of accumulated tech debt and user issues, I finally have the capacity to revive projects like this and keep them in excellent shape.v2 is a new version that improves the calculations accuracy by 5x for the Sun and by 20x for the Moon, verified by an extensive test harness vs ground truth from US Naval Observatory, in addition to fixing a ton of issues and modernizing the distribution with ESM. Hope you enjoy it.