nowfound

Life & fun · June 1, 2025

Moon Phase Algorithms for C, Lua, Awk, JavaScript, etc.

A collection of impls to get the current moon phase - iriswebb/moonphase

Moon Phase Algorithms for C, Lua, Awk, JavaScript, etc. launched on June 1, 2025 with 72 votes, #504 of 7,999 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 1 year on.

Visit github.com ↗Alternativestop 6% of June 2025

In plain words

Moon Phase Algorithms is a collection of computational tools for calculating lunar phases across multiple programming languages including C, Lua, Awk, and JavaScript. Designed for developers and astronomers who need to programmatically determine moon phase data, it provides algorithms that can be integrated into various applications. The multi-language support makes it accessible to projects regardless of their technology stack.

written from the facts on this page · September 2026

From the sources

These functions take a time as an input (usually in unix epoch seconds or the languages official way of doing time), and return the "age" of the moon in radians, such that (1-cos(x))/2 returns the illuminated fraction of the moons surface, this indirection is needed because across a full cycle, the same illuminated percent appears more than once, the first and third quarter are a good example. All implementations contain test cases showing how to get the illuminated fraction and percent using the code. When the age of the moon is converted into a range between [0,1] . You can then get the age of the moon in days by multiplying it by ~29.5. You can also get the "index" of the phase, required…from github.com

Does a similar job

all alternatives →
  • Tiny Moon – Swift library to calculate the moon phase2024 · github.com · ▲106

    Tiny Moon is a tiny Swift library to calculate the moon phase for any given date, works super fast, and works completely offline. All of this started when I realized that we only have 12, sometimes 13, full moon's in a year. That doesn’t seem like that many. I set out to build a MacOS app to remind me when a full moon occurs, so that I could take a moment and step outside to appreciate it. The MacOS app I ended up creating can be found at https://apps.apple.com/us/app/tiny-moon/id6502374344 along with the source code [0], all powered by the Tiny Moon library. I…

  • Moon – 3kb JavaScript UI compiler2018 · kbrsh.github.io · ▲71

    The purely functional user interface library that

  • Moon – fast 7k Vue alternative2017 · github.com · ▲268

    🌙 The minimal & fast library for functional user interfaces - kbrsh/moon

  • moon2023 · moonrepo.dev · ▲99

    A multi-language monorepo tool

  • MA
  • Data-viz project for ray-tracing the Moon model2019 · github.com · ▲72

    Data visualisation and ray tracing in Python based on OptiX 9.1 framework. - plotoptix/examples/3_projects/moon at master · rnd-team-dev/plotoptix

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, June 2025

the whole month →
  • IM

    Hey HN! Pilots everywhere are required to keep a logbook of all their flying hours, aircraft, airports, and so on. Since I track everything digitally (some people still just use paper logbooks!), I put together some data visualizations and a few 3D globes to show my flying history. This globe is probably my favourite so far: https://jameshard.ing/pilot/globes/all If you’ve got ideas for other graphs or ways to show this kind of data, I’d love to hear them!

    Life & fun · 2025 · jameshard.ing

  • Stunning presentations with AI. No design skills required.

    AI · 2025 · chroniclehq.com

  • Build native mobile apps for iOS and Android without code.

    Dev tools · 2025 · bble.io

  • Twenty▲989

    Build your Enterprise CRM with an AI-friendly SDK

    Dev tools · 2025 · twenty.com

  • All your connections, across all your socials.

    AI · 2025 · pally.com

  • I was the main contributor to workout.lol, an open-source fitness app to easily build a workout routine. The project had traction (1.4k GitHub stars, 95 forks, ~20K visits/month), but was eventually sold due to video licensing hurdles. The new owner stopped maintaining it, and the repo went abandoned. Over the next 9 months, I sent 15 emails to try to save it : no replies. Feature requests & issues were ignored. The community was left with a "broken" tool let's say. I couldn't just let it die So I built the new version from scratch with the same open-source spirit, but a better…

    Dev tools · 2025 · github.com