Latest / Learning & reference

moonphase

github.com · Open source · Active

Moon phase calculation code in many languages, collected in one repo

Visit github.com ↗Share

  • moon phase
  • moon phase code
  • moon phase algorithm
  • lunar phase calculation
  • moon age function
  • moon phase examples
Stars
83
Forks
5
Open issues
0
Last commit
Found
18 months ago

GitHub figures as of . They are context, not a ranking.

moonphase is a repository of implementations that compute the current moon phase, written in languages including C, Lua, Awk and JavaScript. It works as a reference for comparing one algorithm across languages, which suits programmers who want a small example in a familiar language.

Repository description on GitHub: “A collection of impls to get the current moon phase”

What it does

  • Moon phase implementations in many languages including C, Rust, Lua and Python
  • Returns moon age in radians and the illuminated fraction
  • Test cases in each implementation show how to compute the phase

Good for

  • Compare one moon phase algorithm across several languages
  • Copy a small moon phase function into a project

Suits: Programmers who want a small example in a familiar language.

What you can try

Read the README on GitHub and browse the implementation for your language.

Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.

Found vs. released

Kip first saw moonphase on , when oliverkwebb posted it to Show HN. GitHub listed no published releases for oliverkwebb/moonphase when checked , so the project may ship straight from its main branch. The repository was created .

Day-7 and day-30 updates

Day 7 no new release

  • No tagged release was published in the first 7 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 72 points, 16 comments. API record

Checked , later than day 7 because tracking began after.

Day 30 no new release

  • No tagged release was published in the first 30 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 72 points, 16 comments. API record

Checked , later than day 30 because tracking began after.

Release timeline every entry links to its source

  1. Repository created on GitHub: oliverkwebb/moonphase
  2. Found: oliverkwebb posted it to Show HN. Show HN
  3. Day-7 check recorded by Kip (details)
  4. Day-30 check recorded by Kip (details)

Quick answers

When was moonphase released?
No dated release record is available. Kip found it on Show HN on 1 Jun 2025.
Is moonphase open source?
Its source is public on GitHub at oliverkwebb/moonphase under the 0BSD licence.
Is moonphase free?
It is open source, so the code is free to read and run; check the licence for terms.
Is moonphase still maintained?
Yes. It had a commit or release in the last 90 days as of the latest check.

Provenance

SourceRecordLast checked
Show HNlisting
official API record
GitHub repositoryoliverkwebb/moonphase
REST API record
GitHub Releasesrelease list
REST API record

Stable ID hn-44154511. Summary written by KipFound’s editor.

Share

Similar tools

More in Learning & reference

Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.