diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/ChineseDateFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/ChineseDateFormat.java index 7986f7a75e..2601334933 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/ChineseDateFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/ChineseDateFormat.java @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright (C) 2000-2009, International Business Machines Corporation and + * Copyright (C) 2000-2010, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************* */ @@ -71,10 +71,17 @@ public class ChineseDateFormat extends SimpleDateFormat { } /** - * Construct a ChineseDateFormat from a date format pattern and locale + * Construct a ChineseDateFormat from a date format pattern, numbering system override and locale * @param pattern the pattern + * @param override The override string. A numbering system override string can take one of the following forms: + * 1). If just a numbering system name is specified, it applies to all numeric fields in the date format pattern. + * 2). To specify an alternate numbering system on a field by field basis, use the field letters from the pattern + * followed by an = sign, followed by the numbering system name. For example, to specify that just the year + * be formatted using Hebrew digits, use the override "y=hebr". Multiple overrides can be specified in a single + * string by separating them with a semi-colon. For example, the override string "m=thai;y=deva" would format using + * Thai digits for the month and Devanagari digits for the year. * @param locale the locale - * @stable ICU 3.2 + * @draft ICU 4.2 */ public ChineseDateFormat(String pattern, String override, ULocale locale) { super(pattern, new ChineseDateFormatSymbols(locale), 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 fa6e888ee8..ba21e984ea 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 @@ -407,6 +407,15 @@ public class SimpleDateFormat extends DateFormat { /** * Constructs a SimpleDateFormat using the given pattern , override and locale. + * @param pattern The pattern to be used + * @param override The override string. A numbering system override string can take one of the following forms: + * 1). If just a numbering system name is specified, it applies to all numeric fields in the date format pattern. + * 2). To specify an alternate numbering system on a field by field basis, use the field letters from the pattern + * followed by an = sign, followed by the numbering system name. For example, to specify that just the year + * be formatted using Hebrew digits, use the override "y=hebr". Multiple overrides can be specified in a single + * string by separating them with a semi-colon. For example, the override string "m=thai;y=deva" would format using + * Thai digits for the month and Devanagari digits for the year. + * @param loc The locale to be used * @stable ICU 4.2 */ public SimpleDateFormat(String pattern, String override, ULocale loc) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java b/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java index fe9723c1af..29c401f617 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java @@ -3140,9 +3140,16 @@ public abstract class Calendar implements Serializable, Cloneable, ComparableDateFormat * subclass + * @param override The override string. A numbering system override string can take one of the following forms: + * 1). If just a numbering system name is specified, it applies to all numeric fields in the date format pattern. + * 2). To specify an alternate numbering system on a field by field basis, use the field letters from the pattern + * followed by an = sign, followed by the numbering system name. For example, to specify that just the year + * be formatted using Hebrew digits, use the override "y=hebr". Multiple overrides can be specified in a single + * string by separating them with a semi-colon. For example, the override string "m=thai;y=deva" would format using + * Thai digits for the month and Devanagari digits for the year. * @param locale the locale for which the symbols should be drawn * @return a DateFormat appropriate to this calendar - * @stable ICU 2.0 + * @stable ICU 4.2 */ protected DateFormat handleGetDateFormat(String pattern, String override, Locale locale) { return handleGetDateFormat(pattern, override, ULocale.forLocale(locale)); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/ChineseCalendar.java b/icu4j/main/classes/core/src/com/ibm/icu/util/ChineseCalendar.java index 246dfb03af..ba45507fec 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/ChineseCalendar.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/ChineseCalendar.java @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright (C) 2000-2009, International Business Machines + * Copyright (C) 2000-2010, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************* */ @@ -402,7 +402,16 @@ public class ChineseCalendar extends Calendar { * using the the given pattern. This method is responsible for * creating the calendar- specific DateFormat and DateFormatSymbols * objects as needed. - * @stable ICU 2.8 + * @param pattern The date formatting pattern + * @param override The override string. A numbering system override string can take one of the following forms: + * 1). If just a numbering system name is specified, it applies to all numeric fields in the date format pattern. + * 2). To specify an alternate numbering system on a field by field basis, use the field letters from the pattern + * followed by an = sign, followed by the numbering system name. For example, to specify that just the year + * be formatted using Hebrew digits, use the override "y=hebr". Multiple overrides can be specified in a single + * string by separating them with a semi-colon. For example, the override string "m=thai;y=deva" would format using + * Thai digits for the month and Devanagari digits for the year. + * @param locale The locale + * @stable ICU 4.2 */ protected DateFormat handleGetDateFormat(String pattern, String override, ULocale locale) { return new ChineseDateFormat(pattern, override, locale);