Siddhanta Parity API Documentation - v1.3.0
    Preparing search index...
    • Searches for the date and time that the Moon reaches a specified phase.

      Lunar phases are defined in terms of geocentric ecliptic longitudes with respect to the Sun. When the Moon and the Sun have the same ecliptic longitude, that is defined as a new moon. When the two ecliptic longitudes are 180 degrees apart, that is defined as a full moon. To enumerate quarter lunar phases, it is simpler to call SearchMoonQuarter once, followed by repeatedly calling NextMoonQuarter. SearchMoonPhase is only necessary for finding other lunar phases than the usual quarter phases.

      Parameters

      • targetLon: number

        The difference in geocentric ecliptic longitude between the Sun and Moon that specifies the lunar phase being sought. This can be any value in the range [0, 360). Here are some helpful examples: 0 = new moon, 90 = first quarter, 180 = full moon, 270 = third quarter.

      • dateStart: FlexibleDateTime

        The beginning of the window of time in which to search.

      • limitDays: number

        The floating point number of days away from dateStart that limits the window of time in which to search. If the value is negative, the search is performed into the past from startTime. Otherwise, the search is performed into the future from startTime.

      Returns AstroTime | null

      If successful, returns the date and time the moon reaches the phase specified by targetlon. This function will return null if the phase does not occur within limitDays of startTime; that is, if the search window is too small.