diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java index 0e58f9d23ad..8be6e47f357 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/IBMCalendarTest.java @@ -2104,8 +2104,8 @@ public class IBMCalendarTest extends CalendarTestFmwk { public void checkConsistency(String locale) { boolean quick = getExhaustiveness() <= 5; - // Check 3 years in quick mode and 8000 years in exhaustive mode. - int numOfDaysToTest = (quick ? 3 * 365 : 8000 * 365); + // Check 3 years in quick mode and 6000 years in exhaustive mode. + int numOfDaysToTest = (quick ? 3 * 365 : 6000 * 365); int msInADay = 1000*60*60*24; // g is just for debugging messages. @@ -2115,6 +2115,9 @@ public class IBMCalendarTest extends CalendarTestFmwk { Calendar r = (Calendar)base.clone(); int lastDay = 1; + String type = base.getType(); + boolean ignoreOrdinaryMonth12Bug = (!quick) && (type.equals("chinese") || type.equals("dangi")); + boolean ignoreICU22258 = (!quick) && type.equals("dangi"); for (int j = 0; j < numOfDaysToTest; j++, test.setTime(test.getTime() - msInADay)) { g.setTime(test); base.clear(); @@ -2159,6 +2162,19 @@ public class IBMCalendarTest extends CalendarTestFmwk { } Date result = r.getTime(); if (!test.equals(result)) { + if (ignoreOrdinaryMonth12Bug && base.get(Calendar.ORDINAL_MONTH) == 12) { + logKnownIssue("ICU-22230", "Problem December in Leap Year"); + continue; + } + int year = base.get(Calendar.YEAR); + int month = base.get(Calendar.MONTH) + 1; + int date = base.get(Calendar.DATE); + if (ignoreICU22258 && (year == 4 || year == 34) && month == 12 && date == 30) { + logKnownIssue("ICU-22258", + "Dangi Problem in 1988/2/17=>4/12/30 and 1958/2/18=>34/12/30"); + continue; + } + errln("Round trip conversion produces different time from " + test + " to " + result + " delta: " + (result.getTime() - test.getTime()) + " Gregorian(e=" + g.get(Calendar.ERA) + " " + g.get(Calendar.YEAR) + "/" +