Primary and intermediate phases
jasonsturges opened this issue · 4 comments
This has come up repeatedly, and need to isolate some notion of primary an intermediary phases.
Primary phases occur at a specific moment in time, and include:
- New Moon
- First Quarter
- Full Moon
- Last Quarter
Intermediate phases are ~7.4 days and do not occur at a specific moment in time. They include:
- Waxing Crescent
- Waxing Gibbous
- Waning Gibbous
- Waning Crescent
API not yet determined to implement this.
Hi @jasonsturges just passing by to check if this was implemented since and I missed out?
Thanks for the awesome library btw :)
Remind me - were you wanting to see the current phase, or just the ability to pull these as separate values?
Full moon is a specific moment in time, but I think many people want the phase reported as full from that moment to the next phase. Still not entirely sure how to implement that in a clear way....
I'll try to dedicate some more time to this library.
I ended up using another library to get the phase names, there's a function that shows the phases around a given date: https://github.com/ryanseys/lune?tab=readme-ov-file#to-search-for-recent-phases-around-the-current-date
From what I've tried out, the phases are between 5 and 8 days. I used Luxon to create 1-day intervals to cover the points in time (new moon, full moon, first quarter, last quarter) and then created intervals in between them.
@rudolfolah Interesting, I haven't seen this library before.
Yeah, there are tons of packages - https://github.com/cosinekitty/astronomy is one that predicts upcoming phases. Thousands of SLOC available for advanced scientific usage.
Glad you found something that works for you.