Reference · The same, with suncalc 1's conventions (radians, azimuth from south)
LegacyMoonIlluminationtype
The Moon's illumination in suncalc 1's terms: the lit fraction, the phase 0 to 1, and the bright limb's angle in radians, negative while the Moon waxes and positive while it wanes.
Import it
import type { LegacyMoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";
Definition
interface LegacyMoonIllumination {
fraction: number;
phase: number;
angle: number;
}
Members
| Name | Type | Description |
|---|---|---|
fraction | number | |
phase | number | |
angle | number |
Examples
import { getMoonIllumination, type LegacyMoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";
const m: LegacyMoonIllumination = getMoonIllumination(new Date(Date.UTC(2026, 10, 24, 14)));
console.log(m.fraction >= 0 && m.fraction <= 1);trueWhat it prints (run when this page was built)