Package com.ibm.icu.util

Examples of com.ibm.icu.util.TimeZone.inDaylightTime()


        cal.set(1997, Calendar.APRIL, 30);
        Date d = cal.getTime();

        logln("The timezone is " + time_zone.getID());

        if (time_zone.inDaylightTime(d) != true)
            errln("FAIL: inDaylightTime returned false");

        if (time_zone.useDaylightTime() != true)
            errln("FAIL: useDaylightTime returned false");
View Full Code Here


            if (offsets1[0] != offsets2[0] || offsets1[1] != offsets2[1]) {
                errln("FAIL: Incompatible time zone offsets for ny and rbtz");
            }
            // Check inDaylightTime
            Date d = new Date(times[i]);
            if (rbtz.inDaylightTime(d) != ny.inDaylightTime(d)) {
                errln("FAIL: Incompatible daylight saving time for ny and rbtz");
            }
        }
    }
View Full Code Here

    public void testInDaylightTime() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        Calendar cal = Calendar.getInstance();
        cal.set(2005, 0, 17);
        Date date = cal.getTime();
        assertFalse(tz.inDaylightTime(date));
        cal.set(2005, 6, 17);
        date = cal.getTime();
        assertTrue(tz.inDaylightTime(date));
    }
View Full Code Here

        cal.set(2005, 0, 17);
        Date date = cal.getTime();
        assertFalse(tz.inDaylightTime(date));
        cal.set(2005, 6, 17);
        date = cal.getTime();
        assertTrue(tz.inDaylightTime(date));
    }

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getTimeZone(String)'
     */
 
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.