Package org.threeten.bp

Examples of org.threeten.bp.LocalDateTime.withDayOfMonth()


        map.put(2L, "2nd");
        map.put(3L, "3rd");
        builder.appendText(DAY_OF_MONTH, map);
        DateTimeFormatter f = builder.toFormatter();
        LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
        assertEquals(f.format(dt.withDayOfMonth(1)), "1st");
        assertEquals(f.format(dt.withDayOfMonth(2)), "2nd");
        assertEquals(f.format(dt.withDayOfMonth(3)), "3rd");
    }

    @Test
View Full Code Here


        map.put(3L, "3rd");
        builder.appendText(DAY_OF_MONTH, map);
        DateTimeFormatter f = builder.toFormatter();
        LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
        assertEquals(f.format(dt.withDayOfMonth(1)), "1st");
        assertEquals(f.format(dt.withDayOfMonth(2)), "2nd");
        assertEquals(f.format(dt.withDayOfMonth(3)), "3rd");
    }

    @Test
    public void test_appendTextMapIncomplete() throws Exception {
View Full Code Here

        builder.appendText(DAY_OF_MONTH, map);
        DateTimeFormatter f = builder.toFormatter();
        LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0);
        assertEquals(f.format(dt.withDayOfMonth(1)), "1st");
        assertEquals(f.format(dt.withDayOfMonth(2)), "2nd");
        assertEquals(f.format(dt.withDayOfMonth(3)), "3rd");
    }

    @Test
    public void test_appendTextMapIncomplete() throws Exception {
        Map<Long, String> map = new HashMap<Long, 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.