Hacker GitHub

← All repos

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

Mentions per year 8 mentions · busiest year 2026 (2)
20082026
  1. …this — I recently released a major overhaul of the library that makes it a lot more precise: https://github.com/mourner/suncalc
    comment by mourner · 2026-08-17 · in Sun Clock
  2. Wrote it 14 years ago! https://github.com/mourner/suncalc/ It's a bit neglected but I'll do some upkeep shortly...
  3. …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:…
  4. …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?
  5. 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