Show HN: SunCalc v2 – a tiny JavaScript library for sun and moon calculations
Category: library
Tags: astronomy, javascript-library, sun-calculations
Score: 7.0/10 (Innovation: 5, Technical: 7, Documentation: 9, Utility: 7)
SunCalc v2 is a tiny, dependency-free JavaScript library that calculates sun and moon positions, sunlight phases, and lunar phases with high accuracy based on Jean Meeus' astronomical algorithms. It offers a well-documented, ready-to-use solution for developers needing precise celestial calculations in applications like photography, astronomy, or outdoor planning. Its validation against authoritative sources and ease of use make it a polished tool for a moderate audience.
Target audience: backend devs, frontend devs, data engineers
Repository: https://github.com/mourner/suncalc · JavaScript · BSD-2-Clause · 3371 stars
View on Hacker News