From b40d690f2a0ad0cd4e83611520a28668847d9759 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Mon, 6 Jan 2014 15:31:22 +0000 Subject: [PATCH] ICU-10615 A quick fix for 2-digit year parsing problem with Japanese calendar. Need more investigation. X-SVN-Rev: 34830 --- .../classes/core/src/com/ibm/icu/text/SimpleDateFormat.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleDateFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleDateFormat.java index f3513e43add..ffff47451a3 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleDateFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleDateFormat.java @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 1996-2013, International Business Machines Corporation and * + * Copyright (C) 1996-2014, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -2819,7 +2819,7 @@ public class SimpleDateFormat extends DateFormat { /* Skip this for Chinese calendar, moved from ChineseDateFormat */ if ( override != null && (override.compareTo("hebr") == 0 || override.indexOf("y=hebr") >= 0) && value < 1000 ) { value += HEBREW_CAL_CUR_MILLENIUM_START_YEAR; - } else if (count == 2 && (pos.getIndex() - start) == 2 && !isChineseCalendar + } else if (count == 2 && (pos.getIndex() - start) == 2 && !isChineseCalendar && !cal.getType().equals("japanese") && UCharacter.isDigit(text.charAt(start)) && UCharacter.isDigit(text.charAt(start+1))) { -- 2.40.0