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. ▲ 3
    Show HN: SunCalc v2 – a tiny JavaScript library for sun and moon calculations
    story by mourner · 2026-06-18 · 0 comments
  3. Wrote it 14 years ago! https://github.com/mourner/suncalc/ It's a bit neglected but I'll do some upkeep shortly...
  4. ▲ 106
    Show HN: Tiny Moon – Swift library to calculate the moon phase
    story by mannylopez · 2024-07-25 · 35 comments
  5. ▲ 1
    Show HN: Color-scheme-switcher: auto/manual color scheme toggling in React
    story by MrCalifornian · 2023-08-16 · 1 comment
  6. …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:…
  7. …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?
  8. 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