-
Notifications
You must be signed in to change notification settings - Fork 14
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
Lunar Day Calculation #18
Comments
@ryanve Hi, thanks. The Lunar AgeAge in Earth days through the current lunar cycle, equivalent to 29.53059 Earth days, based on Mean Synodic Month, 2000 AD mean solar days.
To get the lunar age (ex: 16.54412413414952) const age = Moon.lunarAge(); Does that work for you? |
@jasonsturges thank you i've been wondering whether lunar days are different and i think lunar days are different than earth days. For example just before the new moon tomorrow will be the 30th lunar day. Lunar days are used in astrology like in this business calendar or shopping calender or haircut calender |
@ryanve Interesting, I'm not familiar how astrology calculates this. Lunar vs lunisolar calendars align lunar months with the solar year through different intercalation - approximately 29.5 days, although it appears some calendars alternate between 29 and 30 day synodic months to complete one year of 12 lunations. Here, using the Gregorian calendar, this fraction normalizes years (and leap years) providing accuracy for the next 31,000 years at which point this calculation will be 1-day behind. But it is interesting that over this ~25,000 day fraction are 451 30-day full months and 399 29-day hollow months. Not sure where to go from here... I'll look at how these alternating full / hollow months fit into current calculations, but there are other variations that might be applicable to your needs of astrology. Would you know roots of astrology lunar calendars? Would they stem from Chinese, Hebrew, Hindu, Islamic, or other culture? |
An Indian women explains about it YouTube. Sounds calculable in a global way but she says timezone has influence in application with local sunrise. MoonHoroscope has it on their homepage. |
I will be surprised, but Chinese astrology / Chinese calendar is doing it in another different way. Some months have 29 lunar days, others have 30. This way they approximate average 29.53059 days synodic month. |
@dannylin108 Yes, this average calculation provides accuracy for the next 31,000 years. Several people have asked for variations of these calculations for different purposes. Besides researching the calculations, I've implemented a new options system that should better facilitate these requests. |
Cool library. How about adding a
lunarDay
method to calculate the lunar day. Seems doable by dividing the lunar age. On the new moon it'd return 1 and so on. Returning a float would work or havelunarDay
return a floored integer and accompany it with alunarDayPercent
method that returns how far into that day we are. Thoughts?The text was updated successfully, but these errors were encountered: