Examples of inDaylightTime()


Examples of com.ibm.icu.impl.TimeZoneAdapter.inDaylightTime()

                int mid = cal.get(Calendar.MILLISECONDS_IN_DAY);
                a_offset = tza_a.getOffset(era, year, month, day, dow, mid);
                b_offset = tza_b.getOffset(era, year, month, day, dow, mid);
                Date d = new Date(sampleTimes[i]);
                a_dst = tza_a.inDaylightTime(d);
                b_dst = tza_b.inDaylightTime(d);
                if (a_offset != b_offset || a_dst != b_dst) {
                    bSame = false;
                    break;
                }
            }
View Full Code Here

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

            errln("FAIL: getRawOffset returned different results in VTimeZone and OlsonTimeZone");
        }

        // inDaylightTime
        Date d = new Date();
        if (otz.inDaylightTime(d) != vtz.inDaylightTime(d)) {
            errln("FAIL: inDaylightTime returned different results in VTimeZone and OlsonTimeZone");
        }

        // useDaylightTime
        if (otz.useDaylightTime() != vtz.useDaylightTime()) {
View Full Code Here

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

        // dlf - this test is no longer relevant, we display generic time now
        //    so the behavior of the timezone doesn't matter
        SimpleTimeZone zone2 = new SimpleTimeZone(0, "PST");
        zone2.setStartRule(Calendar.JANUARY, 1, 0);
        zone2.setEndRule(Calendar.DECEMBER, 31, 86399999);
        logln("Modified PST inDaylightTime->" + zone2.inDaylightTime(new Date()));
        name = zone2.getDisplayName(Locale.ENGLISH);
        logln("Modified PST->" + name);
        if (!name.equals("Pacific Time"))
            errln("Fail: Expected \"Pacific Time\"");
View Full Code Here

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

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

            errln("FAIL: getRawOffset returned different results in VTimeZone and OlsonTimeZone");
        }

        // inDaylightTime
        Date d = new Date();
        if (otz.inDaylightTime(d) != vtz.inDaylightTime(d)) {
            errln("FAIL: inDaylightTime returned different results in VTimeZone and OlsonTimeZone");
        }

        // useDaylightTime
        if (otz.useDaylightTime() != vtz.useDaylightTime()) {
View Full Code Here

Examples of java.util.SimpleTimeZone.inDaylightTime()

      Calendar.APRIL, 26, 0, t1,
      Calendar.OCTOBER, 25, 0, t2, dst);
   
    GregorianCalendar c = new GregorianCalendar(z);
    c.set(2004, Calendar.APRIL, 25, 8, 0, 0);
    harness.check(!z.inDaylightTime(c.getTime()));
    c.set(2004, Calendar.APRIL, 26, 8, 0, 0);
    harness.check(z.inDaylightTime(c.getTime()));
   
    c.set(2004, Calendar.OCTOBER, 24, 8, 0, 0);
    harness.check(z.inDaylightTime(c.getTime()));
View Full Code Here

Examples of java.util.SimpleTimeZone.inDaylightTime()

   
    GregorianCalendar c = new GregorianCalendar(z);
    c.set(2004, Calendar.APRIL, 25, 8, 0, 0);
    harness.check(!z.inDaylightTime(c.getTime()));
    c.set(2004, Calendar.APRIL, 26, 8, 0, 0);
    harness.check(z.inDaylightTime(c.getTime()));
   
    c.set(2004, Calendar.OCTOBER, 24, 8, 0, 0);
    harness.check(z.inDaylightTime(c.getTime()));
    c.set(2004, Calendar.OCTOBER, 25, 8, 0, 0);
    harness.check(!z.inDaylightTime(c.getTime()));
View Full Code Here

Examples of java.util.SimpleTimeZone.inDaylightTime()

    harness.check(!z.inDaylightTime(c.getTime()));
    c.set(2004, Calendar.APRIL, 26, 8, 0, 0);
    harness.check(z.inDaylightTime(c.getTime()));
   
    c.set(2004, Calendar.OCTOBER, 24, 8, 0, 0);
    harness.check(z.inDaylightTime(c.getTime()));
    c.set(2004, Calendar.OCTOBER, 25, 8, 0, 0);
    harness.check(!z.inDaylightTime(c.getTime()));
   
    try
    {
View Full Code Here

Examples of java.util.SimpleTimeZone.inDaylightTime()

    harness.check(z.inDaylightTime(c.getTime()));
   
    c.set(2004, Calendar.OCTOBER, 24, 8, 0, 0);
    harness.check(z.inDaylightTime(c.getTime()));
    c.set(2004, Calendar.OCTOBER, 25, 8, 0, 0);
    harness.check(!z.inDaylightTime(c.getTime()));
   
    try
    {
      boolean b = z.inDaylightTime(null);
      harness.check(false);
View Full Code Here

Examples of java.util.SimpleTimeZone.inDaylightTime()

    c.set(2004, Calendar.OCTOBER, 25, 8, 0, 0);
    harness.check(!z.inDaylightTime(c.getTime()));
   
    try
    {
      boolean b = z.inDaylightTime(null);
      harness.check(false);
    }
    catch (NullPointerException e)
    {
      harness.check(true);
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.