The Chinese Calendar Algorithm

This section describes the algorithm to calculate Chinese calendar fields using astronomical data obtained from eleworld.com.

The Chinese calendar is very difficult to calculate. The best algorithm I found on the Internet is the one posted on eleworld.com. This algorithm is based on astronomical data for 200 years from Gregorian year 1901 to year 2100.

The astronomical data has two parts: one part is called Chinese Month Map which can be used for new moon determination, and the other part is called Term Map Set which can be used for solar term determination.

The Chinese Month Map uses 16 bits (2 bytes) for each Gregorian year between 1901 and 2100. The first 4 bits represents an integer indicating the leap month of the year. The rest 12 bits are flags indicating number of days of the corresponding regular month: 1 means 29 days and 0 means 30 days. These 2 bytes are stored in low-high order.

The Term Map Set has 4 tables: Principle Term Map, Principle Term Year, Sectional Term Map, and Sectional Term Year.

A copy of the astronomical data is presented in the Chinese calendar program described in the next section.

Table of Contents

 About This Book

 Chinese Calendar Background Information

Chinese Calendar Algorithm and Program

 The Gregorian Calendar Algorithm

The Chinese Calendar Algorithm

 Chinese Calendar Program in java

 How to Use Chinese Calendar Program

 Chinese Calendar Format and Notations

 Chinese Calendars: Year 1901 to 1910

 Chinese Calendars: Year 1911 to 1920

 Chinese Calendars: Year 1921 to 1930

 Chinese Calendars: Year 1931 to 1940

 Chinese Calendars: Year 1941 to 1950

 Chinese Calendars: Year 1951 to 1960

 Chinese Calendars: Year 1961 to 1970

 Chinese Calendars: Year 1971 to 1980

 Chinese Calendars: Year 1981 to 1990

 Chinese Calendars: Year 1991 to 2000

 Chinese Calendars: Year 2001 to 2010

 Chinese Calendars: Year 2011 to 2020

 Chinese Calendars: Year 2021 to 2030

 Chinese Calendars: Year 2031 to 2040

 Chinese Calendars: Year 2041 to 2050

 Chinese Calendars: Year 2051 to 2060

 Chinese Calendars: Year 2061 to 2070

 Chinese Calendars: Year 2071 to 2080

 Chinese Calendars: Year 2081 to 2090

 Chinese Calendars: Year 2091 to 2100

 References

 PDF Printing Version