API Reference / solarEclipses · function

Function: solarEclipses()

function solarEclipses(
   engine, 
   jdStart, 
   jdEnd): SolarEclipse[];

Solar eclipses in [jdStart, jdEnd], with global circumstances (not local visibility). Each new Moon in the window is tested for an eclipse and, when found, classified by the Moon's shadow geometry.

Parameters

ParameterTypeDescription
engineEngineThe engine used to evaluate positions.
jdStartnumberStart of the window, Julian Day (UT).
jdEndnumberEnd of the window, Julian Day (UT).

Returns

SolarEclipse[]

SolarEclipse records: tMax (greatest eclipse, JD UT), type ("total"/"annular"/"hybrid"/"partial"), gamma (minimum shadow-axis distance in Earth radii), and the begin/end JDs.

Example

const eclipses = solarEclipses(engine, julianDay(2025, 1, 1), julianDay(2030, 1, 1));
eclipses[0].type; // e.g. "partial"

Start building

Quickstart →