Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary and intermediate phases #24

Open
jasonsturges opened this issue Jul 13, 2022 · 4 comments
Open

Primary and intermediate phases #24

jasonsturges opened this issue Jul 13, 2022 · 4 comments
Assignees

Comments

@jasonsturges
Copy link
Owner

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.

@pierroo
Copy link

pierroo commented Sep 29, 2023

Hi @jasonsturges just passing by to check if this was implemented since and I missed out?
Thanks for the awesome library btw :)

@jasonsturges
Copy link
Owner Author

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.

@rudolfolah
Copy link

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.

@jasonsturges
Copy link
Owner Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants