cd /news/developer-tools/show-hn-suncalc-v2-a-tiny-javascript… · home topics developer-tools article
[ARTICLE · art-32736] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Show HN: SunCalc v2 – a tiny JavaScript library for sun and moon calculations

SunCalc v2, a JavaScript library for sun and moon calculations, was released with 5x improved sun accuracy and 20x improved moon accuracy, verified against US Naval Observatory data. The update fixes numerous issues and modernizes distribution with ESM support, reviving a 15-year-old open source project.

read1 min views1 publishedJun 18, 2026

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.

Comments URL: [https://news.ycombinator.com/item?id=48586271](https://news.ycombinator.com/item?id=48586271)

Points: 1

── more in #developer-tools 4 stories · sorted by recency
── more on @suncalc 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-suncalc-v2-a…] indexed:0 read:1min 2026-06-18 ·