mirror of
https://github.com/acamarata/moon-sighting.git
synced 2026-06-30 19:04:24 +00:00
Add typedoc and typedoc-plugin-markdown as devDependencies. Add typedoc.json config targeting src/index.ts with markdown output to .github/wiki/api. Add docs script to package.json. Generate initial API reference pages. Part of T-E8-03 — TypeDoc automation for all 12 JS/TS packages.
993 B
993 B
moon-sighting / getMoonPhase
Function: getMoonPhase()
getMoonPhase(
date?):MoonPhaseResult
Defined in: api/index.ts:487
Compute the Moon's current phase, illumination, and next phase times.
Works WITHOUT a kernel (uses Meeus approximation).
Parameters
date?
Date = ...
Date to compute phase for (default: now)
Returns
MoonPhaseResult with illumination, phase name, age, and next events
Example
const phase = getMoonPhase(new Date())
console.log(phase.phase) // 'waxing-crescent'
console.log(phase.phaseName) // 'Waxing Crescent'
console.log(phase.phaseSymbol) // '🌒'
console.log(phase.illumination)// 14.3 (percent)
console.log(phase.nextFullMoon)// Date object