Search in sources :

Example 51 with TimeZone

use of android.icu.util.TimeZone in project j2objc by google.

the class GlobalizationPreferencesTest method TestDateFormat.

@Test
public void TestDateFormat() {
    GlobalizationPreferences gp = new GlobalizationPreferences();
    String pattern;
    DateFormat df;
    // Set unsupported locale - ach
    logln("Set locale - ach");
    gp.setLocale(new ULocale("ach"));
    // Date - short
    df = gp.getDateFormat(GlobalizationPreferences.DF_SHORT, GlobalizationPreferences.DF_NONE);
    pattern = ((SimpleDateFormat) df).toPattern();
    // root pattern must be used
    if (!pattern.equals("y-MM-dd")) {
        errln("FAIL: SHORT date pattern is " + pattern + " Expected: y-MM-dd");
    }
    // Set locale - fr, fr_CA, fr_FR
    ArrayList lcls = new ArrayList(3);
    lcls.add(new ULocale("fr"));
    lcls.add(new ULocale("fr_CA"));
    lcls.add(new ULocale("fr_FR"));
    logln("Set locales - fr, fr_CA, fr_FR");
    gp.setLocales(lcls);
    // Date - short
    df = gp.getDateFormat(GlobalizationPreferences.DF_SHORT, GlobalizationPreferences.DF_NONE);
    pattern = ((SimpleDateFormat) df).toPattern();
    // fr_CA pattern must be used
    if (!pattern.equals("yy-MM-dd")) {
        errln("FAIL: SHORT date pattern is " + pattern + " Expected: yy-MM-dd");
    }
    // Set locale - en_GB
    logln("Set locale - en_GB");
    gp.setLocale(new ULocale("en_GB"));
    // Date - full
    df = gp.getDateFormat(GlobalizationPreferences.DF_FULL, GlobalizationPreferences.DF_NONE);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("EEEE, d MMMM y")) {
        errln("FAIL: FULL date pattern is " + pattern + " Expected: EEEE, d MMMM y");
    }
    // Date - long
    df = gp.getDateFormat(GlobalizationPreferences.DF_LONG, GlobalizationPreferences.DF_NONE);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("d MMMM y")) {
        errln("FAIL: LONG date pattern is " + pattern + " Expected: d MMMM y");
    }
    // Date - medium
    df = gp.getDateFormat(GlobalizationPreferences.DF_MEDIUM, GlobalizationPreferences.DF_NONE);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("d MMM y")) {
        errln("FAIL: MEDIUM date pattern is " + pattern + " Expected: d MMM y");
    }
    // Date - short
    df = gp.getDateFormat(GlobalizationPreferences.DF_SHORT, GlobalizationPreferences.DF_NONE);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("dd/MM/y")) {
        errln("FAIL: SHORT date pattern is " + pattern + " Expected: dd/MM/y");
    }
    // Time - full
    df = gp.getDateFormat(GlobalizationPreferences.DF_NONE, GlobalizationPreferences.DF_FULL);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("HH:mm:ss zzzz")) {
        errln("FAIL: FULL time pattern is " + pattern + " Expected: HH:mm:ss zzzz");
    }
    // Time - long
    df = gp.getDateFormat(GlobalizationPreferences.DF_NONE, GlobalizationPreferences.DF_LONG);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("HH:mm:ss z")) {
        errln("FAIL: LONG time pattern is " + pattern + " Expected: HH:mm:ss z");
    }
    // Time - medium
    df = gp.getDateFormat(GlobalizationPreferences.DF_NONE, GlobalizationPreferences.DF_MEDIUM);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("HH:mm:ss")) {
        errln("FAIL: MEDIUM time pattern is " + pattern + " Expected: HH:mm:ss");
    }
    // Time - short
    df = gp.getDateFormat(GlobalizationPreferences.DF_NONE, GlobalizationPreferences.DF_SHORT);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("HH:mm")) {
        errln("FAIL: SHORT time pattern is " + pattern + " Expected: HH:mm");
    }
    // Date/Time - full
    df = gp.getDateFormat(GlobalizationPreferences.DF_FULL, GlobalizationPreferences.DF_FULL);
    pattern = ((SimpleDateFormat) df).toPattern();
    if (!pattern.equals("EEEE, d MMMM y 'at' HH:mm:ss zzzz")) {
        errln("FAIL: FULL date/time pattern is " + pattern + " Expected: EEEE, d MMMM y 'at' HH:mm:ss zzzz");
    }
    // Invalid style
    boolean illegalArg = false;
    try {
        df = gp.getDateFormat(-1, GlobalizationPreferences.DF_NONE);
    } catch (IllegalArgumentException iae) {
        logln("Illegal date style -1");
        illegalArg = true;
    }
    if (!illegalArg) {
        errln("FAIL: getDateFormat() must throw IllegalArgumentException for dateStyle -1");
    }
    illegalArg = false;
    try {
        df = gp.getDateFormat(GlobalizationPreferences.DF_NONE, GlobalizationPreferences.DF_NONE);
    } catch (IllegalArgumentException iae) {
        logln("Illegal style - dateStyle:DF_NONE / timeStyle:DF_NONE");
        illegalArg = true;
    }
    if (!illegalArg) {
        errln("FAIL: getDateFormat() must throw IllegalArgumentException for dateStyle:DF_NONE/timeStyle:DF_NONE");
    }
    // Set explicit time zone
    logln("Set timezone - America/Sao_Paulo");
    TimeZone tz = TimeZone.getTimeZone("America/Sao_Paulo");
    gp.setTimeZone(tz);
    df = gp.getDateFormat(GlobalizationPreferences.DF_LONG, GlobalizationPreferences.DF_MEDIUM);
    String tzid = df.getTimeZone().getID();
    if (!tzid.equals("America/Sao_Paulo")) {
        errln("FAIL: The DateFormat instance must use timezone America/Sao_Paulo");
    }
    // Set explicit calendar
    logln("Set calendar - japanese");
    Calendar jcal = new JapaneseCalendar();
    jcal.setTimeZone(TimeZone.getTimeZone("Asia/Tokyo"));
    gp.setCalendar(jcal);
    df = gp.getDateFormat(GlobalizationPreferences.DF_SHORT, GlobalizationPreferences.DF_SHORT);
    Calendar dfCal = df.getCalendar();
    if (!(dfCal instanceof JapaneseCalendar)) {
        errln("FAIL: The DateFormat instance must use Japanese calendar");
    }
    // TimeZone must be still America/Sao_Paulo
    tzid = df.getTimeZone().getID();
    if (!tzid.equals("America/Sao_Paulo")) {
        errln("FAIL: The DateFormat instance must use timezone America/Sao_Paulo");
    }
    // Set explicit DateFormat
    logln("Set explicit date format - full date");
    DateFormat customFD = DateFormat.getDateInstance(new IslamicCalendar(), DateFormat.FULL, new ULocale("ar_SA"));
    customFD.setTimeZone(TimeZone.getTimeZone("Asia/Riyadh"));
    gp.setDateFormat(GlobalizationPreferences.DF_FULL, GlobalizationPreferences.DF_NONE, customFD);
    df = gp.getDateFormat(GlobalizationPreferences.DF_FULL, GlobalizationPreferences.DF_NONE);
    dfCal = df.getCalendar();
    if (!(dfCal instanceof IslamicCalendar)) {
        errln("FAIL: The DateFormat instance must use Islamic calendar");
    }
    // TimeZone in the custom DateFormat is overridden by GP's timezone setting
    tzid = df.getTimeZone().getID();
    if (!tzid.equals("America/Sao_Paulo")) {
        errln("FAIL: The DateFormat instance must use timezone America/Sao_Paulo");
    }
    // Freeze
    logln("Freeze this object");
    gp.freeze();
    DateFormat customLD = DateFormat.getDateInstance(new BuddhistCalendar(), DateFormat.LONG, new ULocale("th"));
    customLD.setTimeZone(TimeZone.getTimeZone("Asia/Bangkok"));
    boolean isFrozen = false;
    try {
        gp.setDateFormat(GlobalizationPreferences.DF_LONG, GlobalizationPreferences.DF_NONE, customLD);
    } catch (UnsupportedOperationException uoe) {
        logln("setDateFormat is blocked");
        isFrozen = true;
    }
    if (!isFrozen) {
        errln("FAIL: setDateFormat must be blocked after frozen");
    }
    // Modifiable clone
    logln("cloneAsThawed");
    GlobalizationPreferences gp1 = (GlobalizationPreferences) gp.cloneAsThawed();
    gp1.setDateFormat(GlobalizationPreferences.DF_LONG, GlobalizationPreferences.DF_NONE, customLD);
    df = gp1.getDateFormat(GlobalizationPreferences.DF_SHORT, GlobalizationPreferences.DF_SHORT);
    dfCal = df.getCalendar();
    if (!(dfCal instanceof JapaneseCalendar)) {
        errln("FAIL: The DateFormat instance must use Japanese calendar");
    }
    // TimeZone must be still America/Sao_Paulo
    tzid = df.getTimeZone().getID();
    if (!tzid.equals("America/Sao_Paulo")) {
        errln("FAIL: The DateFormat instance must use timezone America/Sao_Paulo");
    }
    df = gp1.getDateFormat(GlobalizationPreferences.DF_LONG, GlobalizationPreferences.DF_NONE);
    dfCal = df.getCalendar();
    if (!(dfCal instanceof BuddhistCalendar)) {
        errln("FAIL: The DateFormat instance must use Buddhist calendar");
    }
    // TimeZone must be still America/Sao_Paulo
    tzid = df.getTimeZone().getID();
    if (!tzid.equals("America/Sao_Paulo")) {
        errln("FAIL: The DateFormat instance must use timezone America/Sao_Paulo");
    }
}
Also used : GlobalizationPreferences(android.icu.util.GlobalizationPreferences) ULocale(android.icu.util.ULocale) IslamicCalendar(android.icu.util.IslamicCalendar) GregorianCalendar(android.icu.util.GregorianCalendar) BuddhistCalendar(android.icu.util.BuddhistCalendar) Calendar(android.icu.util.Calendar) JapaneseCalendar(android.icu.util.JapaneseCalendar) ArrayList(java.util.ArrayList) JapaneseCalendar(android.icu.util.JapaneseCalendar) TimeZone(android.icu.util.TimeZone) BuddhistCalendar(android.icu.util.BuddhistCalendar) DateFormat(android.icu.text.DateFormat) SimpleDateFormat(android.icu.text.SimpleDateFormat) IslamicCalendar(android.icu.util.IslamicCalendar) Test(org.junit.Test)

Example 52 with TimeZone

use of android.icu.util.TimeZone in project j2objc by google.

the class IntlTestDateFormatAPI method TestAPI.

// This test checks various generic API methods in DateFormat to achieve 100% API coverage.
@Test
public void TestAPI() {
    logln("DateFormat API test---");
    logln("");
    Locale.setDefault(Locale.ENGLISH);
    // ======= Test constructors
    logln("Testing DateFormat constructors");
    DateFormat def = DateFormat.getInstance();
    DateFormat fr = DateFormat.getTimeInstance(DateFormat.FULL, Locale.FRENCH);
    DateFormat it = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ITALIAN);
    DateFormat de = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, Locale.GERMAN);
    // ======= Test equality
    logln("Testing equality operator");
    if (fr.equals(it)) {
        errln("ERROR: equals failed");
    }
    // ======= Test various format() methods
    logln("Testing various format() methods");
    Date d = new Date((long) 837039928046.0);
    StringBuffer res1 = new StringBuffer();
    StringBuffer res2 = new StringBuffer();
    String res3 = new String();
    FieldPosition pos1 = new FieldPosition(0);
    FieldPosition pos2 = new FieldPosition(0);
    res1 = fr.format(d, res1, pos1);
    logln("" + d.getTime() + " formatted to " + res1);
    res2 = it.format(d, res2, pos2);
    logln("" + d.getTime() + " formatted to " + res2);
    res3 = de.format(d);
    logln("" + d.getTime() + " formatted to " + res3);
    // ======= Test parse()
    logln("Testing parse()");
    String text = new String("02/03/76, 2:50 AM, CST");
    Object result1 = new Date();
    Date result2 = new Date();
    Date result3 = new Date();
    ParsePosition pos = new ParsePosition(0);
    ParsePosition pos01 = new ParsePosition(0);
    result1 = def.parseObject(text, pos);
    if (result1 == null) {
        errln("ERROR: parseObject() failed for " + text);
    }
    logln(text + " parsed into " + ((Date) result1).getTime());
    try {
        result2 = def.parse(text);
    } catch (ParseException e) {
        errln("ERROR: parse() failed");
    }
    logln(text + " parsed into " + result2.getTime());
    result3 = def.parse(text, pos01);
    if (result3 == null) {
        errln("ERROR: parse() failed for " + text);
    }
    logln(text + " parsed into " + result3.getTime());
    // ======= Test getters and setters
    logln("Testing getters and setters");
    final Locale[] locales = DateFormat.getAvailableLocales();
    long count = locales.length;
    logln("Got " + count + " locales");
    // Ticket #6280, #8078 and #11674
    // These locales should be included in the result
    boolean missingLocaleNotFatal = TestUtil.getJavaVendor() == JavaVendor.Android || TestUtil.getJavaVersion() >= 7;
    final Locale[] samples = { new Locale("zh", "CN"), new Locale("zh", "TW"), new Locale("zh", "HK"), new Locale("sr", "RS") };
    boolean[] available = new boolean[samples.length];
    for (int i = 0; i < count; i++) {
        String name;
        name = locales[i].getDisplayName();
        logln(name);
        for (int j = 0; j < samples.length; j++) {
            if (locales[i].equals(samples[j])) {
                available[j] = true;
                break;
            }
        }
    }
    for (int i = 0; i < available.length; i++) {
        if (!available[i]) {
            if (missingLocaleNotFatal) {
                // Java 7 supports script field, so zh_Hans_CN is included
                // in the available locale list.
                logln("INFO: missing Locale: " + samples[i]);
            } else {
                errln("ERROR: missing Locale: " + samples[i]);
            }
        }
    }
    fr.setLenient(it.isLenient());
    if (fr.isLenient() != it.isLenient()) {
        errln("ERROR: setLenient() failed");
    }
    final Calendar cal = def.getCalendar();
    Calendar newCal = (Calendar) cal.clone();
    de.setCalendar(newCal);
    it.setCalendar(newCal);
    if (!de.getCalendar().equals(it.getCalendar())) {
        errln("ERROR: set Calendar() failed");
    }
    final NumberFormat nf = def.getNumberFormat();
    NumberFormat newNf = (NumberFormat) nf.clone();
    de.setNumberFormat(newNf);
    it.setNumberFormat(newNf);
    if (!de.getNumberFormat().equals(it.getNumberFormat())) {
        errln("ERROR: set NumberFormat() failed");
    }
    final TimeZone tz = def.getTimeZone();
    TimeZone newTz = (TimeZone) tz.clone();
    de.setTimeZone(newTz);
    it.setTimeZone(newTz);
    if (!de.getTimeZone().equals(it.getTimeZone())) {
        errln("ERROR: set TimeZone() failed");
    }
// ======= Test getStaticClassID()
// logln("Testing instanceof()");
// try {
// DateFormat test = new SimpleDateFormat();
// if (! (test instanceof SimpleDateFormat)) {
// errln("ERROR: instanceof failed");
// }
// }
// catch (Exception e) {
// errln("ERROR: Couldn't create a DateFormat");
// }
}
Also used : Locale(java.util.Locale) Calendar(android.icu.util.Calendar) FieldPosition(java.text.FieldPosition) Date(java.util.Date) TimeZone(android.icu.util.TimeZone) DateFormat(android.icu.text.DateFormat) ParseException(java.text.ParseException) ParsePosition(java.text.ParsePosition) NumberFormat(android.icu.text.NumberFormat) Test(org.junit.Test)

Example 53 with TimeZone

use of android.icu.util.TimeZone in project j2objc by google.

the class DateFormatTest method TestRelativeDateFormat.

// based on TestRelativeDateFormat() in icu/trunk/source/test/cintltst/cdattst.c
@Test
public void TestRelativeDateFormat() {
    ULocale loc = ULocale.US;
    TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
    Calendar cal = new GregorianCalendar(tz, loc);
    Date now = new Date();
    cal.setTime(now);
    cal.set(Calendar.HOUR_OF_DAY, 18);
    cal.set(Calendar.MINUTE, 49);
    cal.set(Calendar.SECOND, 0);
    Date today = cal.getTime();
    // minutes string to search for in formatted result
    String minutesStr = "49";
    int[] dateStylesList = { DateFormat.RELATIVE_FULL, DateFormat.RELATIVE_LONG, DateFormat.RELATIVE_MEDIUM, DateFormat.RELATIVE_SHORT };
    for (int i = 0; i < dateStylesList.length; i++) {
        int dateStyle = dateStylesList[i];
        DateFormat fmtRelDateTime = DateFormat.getDateTimeInstance(dateStyle, DateFormat.SHORT, loc);
        DateFormat fmtRelDate = DateFormat.getDateInstance(dateStyle, loc);
        DateFormat fmtTime = DateFormat.getTimeInstance(DateFormat.SHORT, loc);
        for (int dayOffset = -2; dayOffset <= 2; dayOffset++) {
            StringBuffer dateTimeStr = new StringBuffer(64);
            StringBuffer dateStr = new StringBuffer(64);
            StringBuffer timeStr = new StringBuffer(64);
            FieldPosition fp = new FieldPosition(DateFormat.MINUTE_FIELD);
            cal.setTime(today);
            cal.add(Calendar.DATE, dayOffset);
            fmtRelDateTime.format(cal, dateTimeStr, fp);
            fmtRelDate.format(cal, dateStr, new FieldPosition(0));
            fmtTime.format(cal, timeStr, new FieldPosition(0));
            logln(dayOffset + ", " + dateStyle + ", " + dateTimeStr);
            logln(dayOffset + ", " + dateStyle + ", " + dateStr);
            logln(dayOffset + ", " + dateStyle + ", " + timeStr);
            // check that dateStr is in dateTimeStr
            if (dateTimeStr.toString().indexOf(dateStr.toString()) < 0) {
                errln("relative date string not found in datetime format with timeStyle SHORT, dateStyle " + dateStyle + " for dayOffset " + dayOffset);
                errln("datetime format is " + dateTimeStr.toString() + ", date string is " + dateStr.toString());
            }
            // check that timeStr is in dateTimeStr
            if (dateTimeStr.toString().indexOf(timeStr.toString()) < 0) {
                errln("short time string not found in datetime format with timeStyle SHORT, dateStyle " + dateStyle + " for dayOffset " + dayOffset);
                errln("datetime format is " + dateTimeStr.toString() + ", time string is " + timeStr.toString());
            }
            // check index of minutesStr
            int minutesStrIndex = dateTimeStr.toString().indexOf(minutesStr);
            if (fp.getBeginIndex() != minutesStrIndex) {
                errln("FieldPosition beginIndex " + fp.getBeginIndex() + " instead of " + minutesStrIndex + " for datetime format with timeStyle SHORT, dateStyle " + dateStyle + " for dayOffset " + dayOffset);
                errln("datetime format is " + dateTimeStr.toString());
            }
        }
    }
}
Also used : TimeZone(android.icu.util.TimeZone) ULocale(android.icu.util.ULocale) BuddhistCalendar(android.icu.util.BuddhistCalendar) HebrewCalendar(android.icu.util.HebrewCalendar) IslamicCalendar(android.icu.util.IslamicCalendar) ChineseCalendar(android.icu.util.ChineseCalendar) GregorianCalendar(android.icu.util.GregorianCalendar) Calendar(android.icu.util.Calendar) JapaneseCalendar(android.icu.util.JapaneseCalendar) DateFormat(android.icu.text.DateFormat) ChineseDateFormat(android.icu.text.ChineseDateFormat) SimpleDateFormat(android.icu.text.SimpleDateFormat) GregorianCalendar(android.icu.util.GregorianCalendar) FieldPosition(java.text.FieldPosition) Date(java.util.Date) Test(org.junit.Test)

Example 54 with TimeZone

use of android.icu.util.TimeZone in project j2objc by google.

the class DateFormatTest method TestTimeZoneDisplayName.

@Test
public void TestTimeZoneDisplayName() {
    Calendar cal = new GregorianCalendar();
    SimpleDateFormat testfmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
    testfmt.setTimeZone(TimeZone.getTimeZone("Etc/GMT"));
    for (int i = 0; i < fallbackTests.length; ++i) {
        String[] info = fallbackTests[i];
        logln(info[0] + ";" + info[1] + ";" + info[2] + ";" + info[3]);
        long time = 0;
        try {
            Date testd = testfmt.parse(info[2]);
            time = testd.getTime();
        } catch (ParseException pe) {
            errln("Failed to parse test date data");
            continue;
        }
        ULocale l = new ULocale(info[0]);
        TimeZone tz = TimeZone.getTimeZone(info[1]);
        SimpleDateFormat fmt = new SimpleDateFormat(info[3], l);
        cal.setTimeInMillis(time);
        cal.setTimeZone(tz);
        String result = fmt.format(cal);
        if (!result.equals(info[4])) {
            errln(info[0] + ";" + info[1] + ";" + info[2] + ";" + info[3] + " expected: '" + info[4] + "' but got: '" + result + "'");
        }
    }
}
Also used : TimeZone(android.icu.util.TimeZone) ULocale(android.icu.util.ULocale) BuddhistCalendar(android.icu.util.BuddhistCalendar) HebrewCalendar(android.icu.util.HebrewCalendar) IslamicCalendar(android.icu.util.IslamicCalendar) ChineseCalendar(android.icu.util.ChineseCalendar) GregorianCalendar(android.icu.util.GregorianCalendar) Calendar(android.icu.util.Calendar) JapaneseCalendar(android.icu.util.JapaneseCalendar) GregorianCalendar(android.icu.util.GregorianCalendar) ParseException(java.text.ParseException) SimpleDateFormat(android.icu.text.SimpleDateFormat) Date(java.util.Date) Test(org.junit.Test)

Example 55 with TimeZone

use of android.icu.util.TimeZone in project j2objc by google.

the class DateTimeGeneratorTest method TestEmpty.

@Test
public void TestEmpty() {
    // now nothing
    DateTimePatternGenerator nullGen = DateTimePatternGenerator.getEmptyInstance();
    SimpleDateFormat format = new SimpleDateFormat(nullGen.getBestPattern("yMdHms"), ULocale.ROOT);
    TimeZone rootZone = TimeZone.getTimeZone("Etc/GMT");
    format.setTimeZone(rootZone);
}
Also used : SimpleTimeZone(android.icu.util.SimpleTimeZone) TimeZone(android.icu.util.TimeZone) DateTimePatternGenerator(android.icu.text.DateTimePatternGenerator) SimpleDateFormat(android.icu.text.SimpleDateFormat) Test(org.junit.Test)

Aggregations

TimeZone (android.icu.util.TimeZone)125 Test (org.junit.Test)98 SimpleTimeZone (android.icu.util.SimpleTimeZone)76 Date (java.util.Date)63 GregorianCalendar (android.icu.util.GregorianCalendar)49 Calendar (android.icu.util.Calendar)42 BasicTimeZone (android.icu.util.BasicTimeZone)41 SimpleDateFormat (android.icu.text.SimpleDateFormat)36 ULocale (android.icu.util.ULocale)31 RuleBasedTimeZone (android.icu.util.RuleBasedTimeZone)24 VTimeZone (android.icu.util.VTimeZone)23 DateFormat (android.icu.text.DateFormat)19 JavaTimeZone (android.icu.impl.JavaTimeZone)18 NativeTimeZone (com.google.j2objc.util.NativeTimeZone)18 JapaneseCalendar (android.icu.util.JapaneseCalendar)15 FieldPosition (java.text.FieldPosition)15 BuddhistCalendar (android.icu.util.BuddhistCalendar)13 ParsePosition (java.text.ParsePosition)13 ChineseCalendar (android.icu.util.ChineseCalendar)12 ParseException (java.text.ParseException)12