Skip to content
← Projects

moon-cycle

Maps any date to a precise lunar phase with high-resolution NASA imagery.

JavaScriptnpm

About

moon-cycle maps any date to a precise lunar phase and pairs it with high-resolution NASA imagery — useful for astrophotography planning, agricultural calendars, and Islamic lunar observances. Zero runtime dependencies.

Install

pnpm add github:acamarata/moon-cycle

Quick start

import { cycleMonth, cdnUrl } from 'moon-cycle';

const filename = cycleMonth();              // e.g. "354.webp"
const url = cdnUrl(filename, 'mm', 256, 75);
// => 'https://cdn.jsdelivr.net/gh/acamarata/moon-cycle@main/mm-256-75/354.webp'

Full API and options onGitHub.