How to Use Chinese Calendar Program

This section describes how to use the Chinese calendar program, ChineseCalendar.java, to calculate Chinese calendar elements of a given date, or generating formatted text based calendar for a given month or year.

The Chinese calendar program, ChineseCalendar.java, described in the previous section can be used 3 purposes:

1. Calculating Chinese calendar elements for any given Gregorian calendar date between year 1901 and year 2100. The command line syntax is: "java ChineseCalendar day yyyy mm dd". For example:

C:\herong>java ChineseCalendar day 2010 2 14
Gregorian Year: 2010
Gregorian Month: 2
Gregorian Date: 14
Is Leap Year: false
Day of Year: 45
Day of Week: 1
Chinese Year: 4707
Heavenly Stem: 6
Earthly Branch: 2
Chinese Month: 1
Chinese Date: 1
Sectional Term: 4
Principle Term: 19

2. Generating a formatted text based Chinese calendar for any given Gregorian calendar month between year 1901 and year 2100. The command line syntax is: "java ChineseCalendar month yyyy mm". For example:

C:\herong>java ChineseCalendar month 2010 2
                    Feb
  Sun   Mon   Tue   Wed   Thu   Fri   Sat
       1/18  2/19  3/20  ST 1  5/22  6/23
 7/24  8/25  9/26 10/27 11/28 12/29 13/30
 CM 1 15/ 2 16/ 3 17/ 4 18/ 5  PT 1 20/ 7
21/ 8 22/ 9 23/10 24/11 25/12 26/13 27/14
28/15

3. Generating a formatted text based Chinese calendar for any given Gregorian calendar year between year 1901 and year 2100. The command line syntax is: "java ChineseCalendar year yyyy". For example:

C:\herong>java ChineseCalendar year 2010
                           Gregorian Calendar Year: 2010

                           Chinese Calendar Year: 4707 (Metal-Tiger)


                    Jan                                        Feb

  Sun   Mon   Tue   Wed   Thu   Fri   Sat    Sun   Mon   Tue   Wed   Thu   Fri   Sat
                               1/17  2/18         1/18  2/19  3/20  ST 1  5/22  6/23
 3/19  4/20  ST12  6/22  7/23  8/24  9/25   7/24  8/25  9/26 10/27 11/28 12/29 13/30
10/26 11/27 12/28 13/29 14/30  CM12 16/ 2   CM 1 15/ 2 16/ 3 17/ 4 18/ 5  PT 1 20/ 7
17/ 3 18/ 4 19/ 5  PT12 21/ 7 22/ 8 23/ 9  21/ 8 22/ 9 23/10 24/11 25/12 26/13 27/14
24/10 25/11 26/12 27/13 28/14 29/15 30/16  28/15
31/17


                    Mar                                        Apr

  Sun   Mon   Tue   Wed   Thu   Fri   Sat    Sun   Mon   Tue   Wed   Thu   Fri   Sat
       1/16  2/17  3/18  4/19  5/20  ST 2                           1/17  2/18  3/19
 7/22  8/23  9/24 10/25 11/26 12/27 13/28   4/20  ST 3  6/22  7/23  8/24  9/25 10/26
14/29 15/30  CM 2 17/ 2 18/ 3 19/ 4 20/ 5  11/27 12/28 13/29  CM 3 15/ 2 16/ 3 17/ 4
 PT 2 22/ 7 23/ 8 24/ 9 25/10 26/11 27/12  18/ 5 19/ 6  PT 3 21/ 8 22/ 9 23/10 24/11
28/13 29/14 30/15 31/16                    25/12 26/13 27/14 28/15 29/16 30/17


                    May                                        Jun

  Sun   Mon   Tue   Wed   Thu   Fri   Sat    Sun   Mon   Tue   Wed   Thu   Fri   Sat
                                     1/18               1/19  2/20  3/21  4/22  5/23
 2/19  3/20  4/21  ST 4  6/23  7/24  8/25   ST 5  7/25  8/26  9/27 10/28 11/29  CM 5
 9/26 10/27 11/28 12/29 13/30  CM 4 15/ 2  13/ 2 14/ 3 15/ 4 16/ 5 17/ 6 18/ 7 19/ 8
16/ 3 17/ 4 18/ 5 19/ 6 20/ 7  PT 4 22/ 9  20/ 9  PT 5 22/11 23/12 24/13 25/14 26/15
23/10 24/11 25/12 26/13 27/14 28/15 29/16  27/16 28/17 29/18 30/19
30/17 31/18


                    Jul                                        Aug

  Sun   Mon   Tue   Wed   Thu   Fri   Sat    Sun   Mon   Tue   Wed   Thu   Fri   Sat
                         1/20  2/21  3/22   1/21  2/22  3/23  4/24  5/25  6/26  ST 7
 4/23  5/24  6/25  ST 6  8/27  9/28 10/29   8/28  9/29  CM 7 11/ 2 12/ 3 13/ 4 14/ 5
11/30  CM 6 13/ 2 14/ 3 15/ 4 16/ 5 17/ 6  15/ 6 16/ 7 17/ 8 18/ 9 19/10 20/11 21/12
18/ 7 19/ 8 20/ 9 21/10 22/11  PT 6 24/13  22/13  PT 7 24/15 25/16 26/17 27/18 28/19
25/14 26/15 27/16 28/17 29/18 30/19 31/20  29/20 30/21 31/22


                    Sep                                        Oct

  Sun   Mon   Tue   Wed   Thu   Fri   Sat    Sun   Mon   Tue   Wed   Thu   Fri   Sat
                   1/23  2/24  3/25  4/26                                 1/24  2/25
 5/27  6/28  7/29  ST 8  9/ 2 10/ 3 11/ 4   3/26  4/27  5/28  6/29  7/30  ST 9  9/ 2
12/ 5 13/ 6 14/ 7 15/ 8 16/ 9 17/10 18/11  10/ 3 11/ 4 12/ 5 13/ 6 14/ 7 15/ 8 16/ 9
19/12 20/13 21/14 22/15  PT 8 24/17 25/18  17/10 18/11 19/12 20/13 21/14 22/15  PT 9
26/19 27/20 28/21 29/22 30/23              24/17 25/18 26/19 27/20 28/21 29/22 30/23
                                           31/24


                    Nov                                        Dec

  Sun   Mon   Tue   Wed   Thu   Fri   Sat    Sun   Mon   Tue   Wed   Thu   Fri   Sat
       1/25  2/26  3/27  4/28  5/29  CM10                     1/26  2/27  3/28  4/29
 ST10  8/ 3  9/ 4 10/ 5 11/ 6 12/ 7 13/ 8   5/30  CM11  ST11  8/ 3  9/ 4 10/ 5 11/ 6
14/ 9 15/10 16/11 17/12 18/13 19/14 20/15  12/ 7 13/ 8 14/ 9 15/10 16/11 17/12 18/13
21/16  PT10 23/18 24/19 25/20 26/21 27/22  19/14 20/15 21/16  PT11 23/18 24/19 25/20
28/23 29/24 30/25                          26/21 27/22 28/23 29/24 30/25 31/26


##/## - Gregorian date/Chinese date, (*)CM## - (Leap) Chinese month first day
ST## - Sectional term, PT## - Principle term

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