mourner/suncalc
View on GitHub ↗ ★ 3,512 JavaScript
A tiny JavaScript library for calculating sun/moon positions and phases.
8 mentions on Hacker News by 6 people: 3 stories, 5 comments · first 2019-02-09 · latest 2026-08-17
20082026
-
▲ 3
Show HN: SunCalc v2 – a tiny JavaScript library for sun and moon calculationsstory by mourner · 2026-06-18 · 0 comments
-
Wrote it 14 years ago! https://github.com/mourner/suncalc/ It's a bit neglected but I'll do some upkeep shortly...
comment by mourner · 2025-08-09 · in Show HN: The current sky at your approximate location, as a CSS gradient -
▲ 106
Show HN: Tiny Moon – Swift library to calculate the moon phasestory by mannylopez · 2024-07-25 · 35 comments
-
▲ 1
Show HN: Color-scheme-switcher: auto/manual color scheme toggling in Reactstory by MrCalifornian · 2023-08-16 · 1 comment
-
…is at within "daylight" vs the whole "day" SunCalc is a good tool for this, if you're interested: https://github.com/mourner/suncalc (I've used it on a personal project, and the API was a little awkward but the results are good:…
comment by kipple · 2022-04-01 · in Show HN: Visualize your day as 144 rectangles -
…public elevation tile data. This blog post [3] is a good overview of the calculations involved. [1] https://github.com/mourner/suncalc [2] https://www.mapzen.com/blog/terrain-tile-service/ [3] http://www.liedman.net/2014/06/25/sunshine/
comment by tppiotrowski · 2021-01-15 · in Ask HN: What are you working on? -
9K of Javascript to handle common Sun, Moon calcs: https://github.com/mourner/suncalc
comment by 8bitsrule · 2019-02-09 · in How to Calculate the Phase of the Moon