getMoonIlluminationfunction
The Moon's phase.
Import it
import { getMoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
Definition
function getMoonIllumination(date?: Date | number): MoonIllumination
Parameters
| Name | Type | Description |
|---|---|---|
date (optional) | number | Date | The moment, as a |
Returns
MoonIllumination
The lit fraction, the phase, the bright limb's position angle in degrees and whether it is waxing.
Examples
import { getMoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
const { fraction, waxing } = getMoonIllumination(new Date(Date.UTC(2026, 10, 24, 14)));
console.log(fraction.toFixed(2), waxing);1.00 trueWhat it prints (run when this page was built)