Sun and Moon Astronomical Data for Programming
This article discusses how to calculate the Chinese Lunar Calendar using the solar and lunar astronomical raw data.
Before looking for our data format, we want to compare the Sun and Moon data with the book of The American Ephemeris for the 21st Century 2001 to 2050 at midnight by Neil F. Michelsen, a calendar bible for western astrology. The difference between two astronomical data should be within 1 minute because of some data without seconds. You will have strong confidence in using our data.
The Theory of Chinese Lunar Calendar
Sun and Moon Data |
American Ephemeris September/October 2003 |
N - New Moon |
New Moon at 9/26 3:10 and 4/25 12:51 |
2003/01/02 20:23:00 N |
The following are sample data for your reference. Note: All sample data are in the text file format. Today, Internet security doesn't recommend to show text files over the Internet. Therefore, we removed them all.
Moon - Lunar Data
- Moon Four Phase Data - Moon Phases Raw Data
- New Moon and Full Data - Moon Two Phases Raw Data
- UT New Moon Data - VB program can generate China New Moon Data, PST New Moon Data
- UT Full Moon Data - VB program can generate China Full Moon Data, PST Full Moon Data
- UT New Moon and Full Moon Data - VB program can generate China Time Zone or PST zone
Full Moon Data is good for the application to find the Easter related holiday.
Sun - Solar Data
- UT Solar Sector Point - VB program generates China Sector Point Data and PST Sector Point Data
- UT Solar Center Point - VB program generates China Center Point Data and PST Center Point Data
- UT Mix Solar Sector and Center Points - VB program generates China Time zone and PST zone Data
Mix Sun and New Moon Data
The VB program combines Sun and Moon Data in the Chinese Astronomical and Civil Calendar sequences from Different time zones.
- Astronomical Calendar - Mix Solar Center Points and New Moons
- UT Center Point and New Moon Data
- China Center Point and New Moon Data
- PST Center Point and New Moon Data
- Civil Calendar - Mix Solar Center Points and New Moons
- Civil UT Center Point and New Moon Data
- Civil China Center Point and New Moon Data
- Civil PST Center Point and New Moon Data
- Mix Solar (Center and Sector) Points and New Moons
- UT Solar Points and New Moon Data
- China Solar Points and New Moon Data
- Civil China Solar Points and New Moon Data
Lunar Months
The VB program calculates the Chinese Astronomical and Civil Lunar Months from Different time zones.
- UT Lunar Months - VB program generates China Lunar Months and PST Lunar Months
- UT Civil Lunar Months - VB program generates China Civil Lunar Months and PST Civil Lunar Months
Lunar Leap Months
The VB program lists Chinese Astronomical and Civil Lunar Leap Months with Double-Center-Point months from Different time zones. It also indicates the Fake Leap Months.
- UT Leap Months - VB program generates China Leap Months and PST Leap Months
- UT Civil Leap Months - VB program generates China Civil Leap Months and PST Civil Leap Months
Another VB program compares the discrepancy about the assignment of Lunar Leap Months from different time zones.
- UT Leap Months and UT Civil Leap Months
- UT Leap Months and China Civil Leap Months
- UT Civil Leap Months and China Civil Leap Months
- China Civil Leap Months and PST Civil Leap Months
- More...
There is no difference in the Lunar Month assignments of Astronomical Calendars from any two different time zone.
Final Data in MS Access Database for Chinese Calendar
Final Sun Data
Simple Sun Table (SunKey) | Sun Table with Date (T01) |
Julian Day . Hour . Minute | Julian Day . Year . Month . Day . Hour . Minute |
20000060338 |
2000006076309200338 2000021076310050527 2000036076310200409 2000051076311040031 2000065076311181850 2000080076312031209 2000095076312180455 2000109076401012217 2000124076401161643 2000139076401311316 2000154076402151211 |
Final Moon Table
New Moon, Lunar Month, Leap Month Data (T02) |
Julian Day . Lunar Month No . Leap Month . Hour. Minute . Civil Lunar Month . Civil Leap Month No |
200002707630900145807630900 200005707631000013307631000 200008607631100141007631100 200011607631200044307631200 200014507640100203907640100 200017507640200131307640200 200020507640300054407640300 200023407640400213307640400 200026407640500120107640500 200029407640600004507640600 200032307640700114507640700 200035207640800213407640800 |
You can import the Sun and Moon data into Access, SQL, Oracle, MySQL, Sybase, or FoxPro database for your application. If you want to manipulate data in different formats, then you can reformat the Sun and Moon raw data and sort the data sequence you want before loading into your database.
We provide some Visual Basic sample programs to work with the Sun and Moon data stored in the Microsoft Access Database.
Go to see the Sample Visual Basic Programs