You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing across multiple dates, I ran into this issue where the phases were in the previous month, including the next new moon. The bug is that the provided date is outside of the interval ranging from the previous new moon to the next new moon.
It can be replicated by trying the date July 6th, 2024, (2024-07-06):
The output is here, you can see the dates are in June 2024 rather than in July 2024:
And when I try the next day over, 2024-07-07, it shows the phases in July 2024:
To work around this issue, in my code I added a conditional to check if the next new moon is before the provided date and if it is, to run the phase hunt 1 day in the future:
// my codebase is using Luxonif(phases.nextnew_date.getTime()<date.getTime()){constfutureDate=DateTime.fromJSDate(date).plus(Duration.fromObject({days: 1})).toJSDate();phases=lune.phase_hunt(futureDate);}// without Luxonif(phases.nextnew_date.getTime()<date.getTime()){constfutureDate=newDate(date.getTime()+(1000*60*60*24));phases=lune.phase_hunt(futureDate);}
The text was updated successfully, but these errors were encountered:
While testing across multiple dates, I ran into this issue where the phases were in the previous month, including the next new moon. The bug is that the provided date is outside of the interval ranging from the previous new moon to the next new moon.
It can be replicated by trying the date July 6th, 2024, (2024-07-06):
The output is here, you can see the dates are in June 2024 rather than in July 2024:

And when I try the next day over, 2024-07-07, it shows the phases in July 2024:
To work around this issue, in my code I added a conditional to check if the next new moon is before the provided date and if it is, to run the phase hunt 1 day in the future:
The text was updated successfully, but these errors were encountered: