mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-03-02 21:58:31 -05:00
In all four versions of Astronomy Engine (C, C#, JavaScript, and Python), starting a search for a full moon near December 19, 2020 would fail. I added a unit test to all four languages and it failed consistently across them all. The root cause: I was too optimistic about how narrow I could make the window around the approximate moon phase time in the SearchMoonPhase functions. Finding the exact moon phase time failed because it was outside this excessively small window around the approximate time. I increased the window from 1.8 days to 3.0 days. This should handle all cases with minimal impact on performance. Now all four of the new unit tests pass.