SunCalc: a dependency-free JavaScript library for calculating solar and lunar data from a date, latitude, and longitude.
It returns:
- Sun altitude and compass direction.
- Sunrise, sunset, dawn, dusk, and golden-hour times.
- Moonrise, moonset, lunar phase, and illumination data.
- Custom solar thresholds for blue-hour interfaces.
👉 Blog Post
👉 GitHub Repo
👉 Live Demo
Top comments (0)