Examples of TZDBRule


Examples of org.threeten.bp.zone.TzdbZoneRulesCompiler.TZDBRule

    // parseMonthDayTime()
    //-----------------------------------------------------------------------
    @Test
    public void test_parseMonthDayTime_marLastSun0220() throws Exception {
        TzdbZoneRulesCompiler test = new TzdbZoneRulesCompiler("2010c", new ArrayList<File>(), null, false);
        TZDBRule mdt = parseMonthDayTime(test, "Mar lastSun 2:20");
        assertEquals(mdt.month, Month.MARCH);
        assertEquals(mdt.dayOfWeek, DayOfWeek.SUNDAY);
        assertEquals(mdt.dayOfMonth, -1);
        assertEquals(mdt.adjustForwards, false);
        assertEquals(mdt.time, LocalTime.of(2, 20));
View Full Code Here

Examples of org.threeten.bp.zone.TzdbZoneRulesCompiler.TZDBRule

    }

    @Test
    public void test_parseMonthDayTime_jun50220s() throws Exception {
        TzdbZoneRulesCompiler test = new TzdbZoneRulesCompiler("2010c", new ArrayList<File>(), null, false);
        TZDBRule mdt = parseMonthDayTime(test, "Jun 5 2:20s");
        assertEquals(mdt.month, Month.JUNE);
        assertEquals(mdt.dayOfWeek, null);
        assertEquals(mdt.dayOfMonth, 5);
        assertEquals(mdt.adjustForwards, true);
        assertEquals(mdt.time, LocalTime.of(2, 20));
View Full Code Here

Examples of org.threeten.bp.zone.TzdbZoneRulesCompiler.TZDBRule

    }

    @Test
    public void test_parseMonthDayTime_maySatAfter50220u() throws Exception {
        TzdbZoneRulesCompiler test = new TzdbZoneRulesCompiler("2010c", new ArrayList<File>(), null, false);
        TZDBRule mdt = parseMonthDayTime(test, "May Sat>=5 2:20u");
        assertEquals(mdt.month, Month.MAY);
        assertEquals(mdt.dayOfWeek, DayOfWeek.SATURDAY);
        assertEquals(mdt.dayOfMonth, 5);
        assertEquals(mdt.adjustForwards, true);
        assertEquals(mdt.time, LocalTime.of(2, 20));
View Full Code Here

Examples of org.threeten.bp.zone.TzdbZoneRulesCompiler.TZDBRule

    }

    @Test
    public void test_parseMonthDayTime_maySatBefore50220u() throws Exception {
        TzdbZoneRulesCompiler test = new TzdbZoneRulesCompiler("2010c", new ArrayList<File>(), null, false);
        TZDBRule mdt = parseMonthDayTime(test, "May Sat<=5 24:00g");
        assertEquals(mdt.month, Month.MAY);
        assertEquals(mdt.dayOfWeek, DayOfWeek.SATURDAY);
        assertEquals(mdt.dayOfMonth, 5);
        assertEquals(mdt.adjustForwards, false);
        assertEquals(mdt.time, LocalTime.of(0, 0));
View Full Code Here

Examples of org.threeten.bp.zone.TzdbZoneRulesCompiler.TZDBRule

    }

    @Test
    public void test_parseMonthDayTime_maySatBefore15Dash() throws Exception {
        TzdbZoneRulesCompiler test = new TzdbZoneRulesCompiler("2010c", new ArrayList<File>(), null, false);
        TZDBRule mdt = parseMonthDayTime(test, "May Sat<=15 -");
        assertEquals(mdt.month, Month.MAY);
        assertEquals(mdt.dayOfWeek, DayOfWeek.SATURDAY);
        assertEquals(mdt.dayOfMonth, 15);
        assertEquals(mdt.adjustForwards, false);
        assertEquals(mdt.time, LocalTime.of(0, 0));
View Full Code Here

Examples of org.threeten.bp.zone.TzdbZoneRulesCompiler.TZDBRule

    }

    @Test
    public void test_parseMonthDayTime_maylastSunShortTime() throws Exception {
        TzdbZoneRulesCompiler test = new TzdbZoneRulesCompiler("2010c", new ArrayList<File>(), null, false);
        TZDBRule mdt = parseMonthDayTime(test, "May lastSun 3z");
        assertEquals(mdt.month, Month.MAY);
        assertEquals(mdt.dayOfWeek, DayOfWeek.SUNDAY);
        assertEquals(mdt.dayOfMonth, -1);
        assertEquals(mdt.adjustForwards, false);
        assertEquals(mdt.time, LocalTime.of(3, 0));
View Full Code Here

Examples of org.threeten.bp.zone.TzdbZoneRulesCompiler.TZDBRule

            throw new RuntimeException(ex);
        }
    }
    private TZDBRule parseMonthDayTime(TzdbZoneRulesCompiler test, String str) throws Exception {
        try {
            TZDBRule mdt = test.new TZDBRule()// create a bound inner class
            PARSE_MDT.invoke(test, new StringTokenizer(str), mdt);
            return mdt;
        } catch (InvocationTargetException ex) {
            if (ex.getCause() != null) {
                throw (Exception) ex.getCause();
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.