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:
![Screenshot 2024-03-09 at 7 43 10 PM](https://private-user-images.githubusercontent.com/89982117/311476234-c776d60d-ec92-4649-a0af-ec609cd76da7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTk1NTEsIm5iZiI6MTcyNTU5OTI1MSwicGF0aCI6Ii84OTk4MjExNy8zMTE0NzYyMzQtYzc3NmQ2MGQtZWM5Mi00NjQ5LWEwYWYtZWM2MDljZDc2ZGE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA2VDA1MDczMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQwOWM4MjVmYWRhNzc5OTVlYjMyY2MxNTcxMWI5Y2MzMzBkMGExODI1MDZlNDM5NzA4ZGRiMzM5YmZhY2VjZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ngJJEJJliqfgxdJu8JGxBFqLoaq_kp61djjMPO4UCkM)
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: