-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
stdlib: Calendar library #466
Conversation
Looking forward to it! 👍 |
The implementation is LUT based. This commit contains LUT for years 2019-2020 for dev purpose.
The calendar data is generated with low accuracy astronomical computation of the time of new moons and solar terms. Due to the low accuracy and/or uncertainty of future leap seconds, calendar near the following days might be off by one day or one month. 1722401 (2018-11-08): maybe wrong 1st day of month (new moon at 1722401.0023) 1736606 (2057-09-29): maybe wrong 1st day of month (new moon at 1736606.0011) 1748269 (2089-09-04): maybe wrong 1st day of month (new moon at 1748270.0003) 1751164 (2097-08-08): maybe wrong 1st day of month (new moon at 1751164.0019) 1757572 (2115-02-24): maybe wrong 1st day of month (new moon at 1757573.0000) 1758015 (2116-05-12): maybe wrong 1st day of month (new moon at 1758016.0002) 1687201 (1922-06-25): maybe wrong leap month (solar term at 1687230.010, new moon at 1687230.8663) 1709998 (1984-11-23): maybe wrong leap month (solar term at 1710027.015, new moon at 1710027.8248) 1710973 (1987-07-26): maybe wrong leap month (solar term at 1711002.009, new moon at 1711002.8329)
d79b416
to
8a0f067
Compare
The calendar data is generated with low accuracy astronomical computation of the time of new moons and solar terms. Due to the low accuracy and/or uncertainty of future leap seconds, calendar near the following days might be off by one day or one month.
Computation methods used for generating the data:
The resulting new moon time is accurate to ~1.5 minutes (uncertainty of delta T excluded), solar term time to ~20 minutes. |
Awesome, thank you so very much! 👍 |
The numeric convention is tentative and open to discussion. It is somewhat arbitrary.
For example, under the tentative convention, 2020-01-25 05:42:00 庚子年正月初一日卯初二刻一十二分 would be: