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.
The beginning of the window of time in which to search.
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.
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.
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.
SearchMoonPhaseis only necessary for finding other lunar phases than the usual quarter phases.