Package com.ibm.icu.text

Examples of com.ibm.icu.text.ChineseDateFormat.formatToCharacterIterator()


        Date nonLeapMonthDate = cal.getTime(); // non-leap month
        cal.set(2009, Calendar.JUNE, 23); // 26x78-5*-1
        Date leapMonthDate = cal.getTime(); // leap month

        ChineseDateFormat cdf = new ChineseDateFormat("y'x'G-Ml-d", ULocale.US);
        acit = cdf.formatToCharacterIterator(nonLeapMonthDate);
        Set keys = acit.getAllAttributeKeys();
        if (keys.contains(ChineseDateFormat.Field.IS_LEAP_MONTH)) {
            errln("FAIL: IS_LEAP_MONTH attribute must not present for Chinese calendar date "
                    + cdf.format(nonLeapMonthDate));
        }
View Full Code Here


        Set keys = acit.getAllAttributeKeys();
        if (keys.contains(ChineseDateFormat.Field.IS_LEAP_MONTH)) {
            errln("FAIL: IS_LEAP_MONTH attribute must not present for Chinese calendar date "
                    + cdf.format(nonLeapMonthDate));
        }
        acit = cdf.formatToCharacterIterator(leapMonthDate);
        keys = acit.getAllAttributeKeys();
        if (!keys.contains(ChineseDateFormat.Field.IS_LEAP_MONTH)) {
            errln("FAIL: IS_LEAP_MONTH attribute must present for Chinese calendar date "
                    + cdf.format(leapMonthDate));
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.