MoonIlluminationtype
The Moon's illumination: the lit fraction 0 to 1, the phase 0 to 1 (0 new, 0.25 first quarter, 0.5 full, 0.75 last quarter), the position angle of the bright limb in degrees eastward from north, and whether it is waxing.
Import it
import type { MoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
Definition
interface MoonIllumination {
fraction: number;
phase: number;
angle: number;
waxing: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
fraction | number | |
phase | number | |
angle | number | |
waxing | boolean |
Examples
import { getMoonIllumination, type MoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
const m: MoonIllumination = 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)