Package com.ibm.icu.util

Examples of com.ibm.icu.util.HebrewCalendar.clear()


            // Leap years are:
            // 3 6 8 11 14 17 19 (and so on - 19-year cycle)
            for (int year=1; year<50; year++) {
                // I hope that year = 0 does not exists
                // because the test fails for it !
                cal.clear();
               
                cal.set(Calendar.YEAR, year);
                cal.set(Calendar.MONTH, ELUL);
                cal.set(Calendar.DAY_OF_MONTH, 1);
               
View Full Code Here


                int monthDelta = DATA[i++];
                int m2 = DATA[i++], y2 = DATA[i++];
                int m3 = DATA[i++], y3 = DATA[i++];
                int mact, yact;
   
                cal.clear();
                cal.set(Calendar.YEAR, y);
                cal.set(Calendar.MONTH, m-1);
                cal.add(Calendar.MONTH, monthDelta);
                yact = cal.get(Calendar.YEAR); mact = cal.get(Calendar.MONTH) + 1;
                if (y2 != yact || m2 != mact) {
View Full Code Here

                if (y2 != yact || m2 != mact) {
                    errln("Fail: " + m + "/" + y +
                          " -> add(MONTH, " + monthDelta + ") -> " +
                          mact + "/" + yact + ", expected " +
                          m2 + "/" + y2);
                    cal.clear();
                    cal.set(Calendar.YEAR, y);
                    cal.set(Calendar.MONTH, m-1);
                    logln("Start: " + m + "/" + y);
                    int delta = monthDelta > 0 ? 1 : -1;
                    for (int c=0; c!=monthDelta; c+=delta) {
View Full Code Here

                        logln("+ " + delta + " MONTH -> " +
                              (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.YEAR));
                    }
                }
               
                cal.clear();
                cal.set(Calendar.YEAR, y);
                cal.set(Calendar.MONTH, m + monthDelta - 1);
                yact = cal.get(Calendar.YEAR); mact = cal.get(Calendar.MONTH) + 1;
                if (y3 != yact || m3 != mact) {
                    errln("Fail: " + (m+monthDelta) + "/" + y +
View Full Code Here

     * With no fields set, the calendar should use default values.
     */
    public void TestDefaultFieldValues() {
        try{
            HebrewCalendar cal = new HebrewCalendar();
            cal.clear();
            logln("cal.clear() -> " + cal.getTime());
        }catch(MissingResourceException ex){
            warnln("could not load the locale data");
        }
    }
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.