API Reference / lunarCrescent · function
Function: lunarCrescent()
function lunarCrescent(
engine,
day,
latDeg,
lonDeg,
opts?): Crescent | null;
Yallop's q test for the lunar crescent on one local day: the evening
crescent after sunset, or with half: "morning" the old crescent before
sunrise.
Parameters
| Parameter | Type | Description |
|---|---|---|
engine | Engine | The engine used to evaluate positions. |
day | number | A local day number from localDay. |
latDeg | number | Observer latitude in degrees, north positive. |
lonDeg | number | Observer longitude in degrees, east positive. |
opts | { altM?: number; half?: Half; } | half ("evening" by default) and altM. |
opts.altM? | number | - |
opts.half? | Half | - |
Returns
Crescent | null
The test's result, or null when the Sun or Moon does not rise
or set that day or the Moon is on the wrong side of the Sun.
Example
const day = localDay(julianDay(2025, 3, 30, 15), 39.8);
lunarCrescent(engine, day, 21.4, 39.8)?.zone; // "A" to "F"