I am recently using com.ibm.icu.util.ChineseCalendar to convert GregorianCalendar dates to lunar dates. However, when I am doing the test on the conversion result, I found a bunch of mismatches. I wonder if it is a defect.
For example, when GregorianCalendar date "2012, August 17th" is inputted as a millisecond value, the lunar date output is "4709/June/30", but it should be "4709/July/1".
There is in total roughly 269 mismatches from Gregorian year 1970 to 2100.
I have attached a test java file to demonstrate the way I have tested the Chinese Calendar.
I have examined the code of Chinese Calendar. Within the file "ChineseCalendar.java", in the function "computeChineseFields(int days, int gyear, int gmonth, boolean setAllFields)", the calculation of the variable "thisMoon //Start of this month" is sometimes wrong.
Philip (Weiyuan) Bao