Caelus3,462 checksGitHubv0.25.0MIT
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

ParameterTypeDescription
engineEngineThe engine used to evaluate positions.
daynumberA local day number from localDay.
latDegnumberObserver latitude in degrees, north positive.
lonDegnumberObserver 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"

Start building

Quickstart →