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.
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 · ▲106Tiny 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 · ▲71The purely functional user interface library that
Moon – fast 7k Vue alternative2017 · github.com · ▲268🌙 The minimal & fast library for functional user interfaces - kbrsh/moon

- MAMoon – a tiny 6kb Javascript library inspired by Vue.js2017 · moonjs.ga · ▲31
Data-viz project for ray-tracing the Moon model2019 · github.com · ▲72Data 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 →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 1d ago · permit.petercai.com
- IV
Life & fun · 14d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 15d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 8d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 13d ago · carrierexplode.com

Life & fun · 22d ago · space.bl2.net
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


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