Examples of withYear()


Examples of org.joda.time.LocalDate.withYear()

        fromDateLocal = fromDateLocal.withMonthOfYear((int) fromDateList.get(1));
        fromDateLocal = fromDateLocal.withDayOfMonth((int) fromDateList.get(2));

        List dueDateList = (List) loanSchedule.get(1).get("dueDate");
        LocalDate dueDateLocal = LocalDate.now();
        dueDateLocal = dueDateLocal.withYear((int) dueDateList.get(0));
        dueDateLocal = dueDateLocal.withMonthOfYear((int) dueDateList.get(1));
        dueDateLocal = dueDateLocal.withDayOfMonth((int) dueDateList.get(2));

        int totalDaysInPeriod = Days.daysBetween(fromDateLocal, dueDateLocal).getDays();
View Full Code Here

Examples of org.threeten.bp.YearMonth.withYear()

    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withYear_tooHigh() {
        YearMonth test = YearMonth.of(2008, 6);
        test.withYear(Year.MAX_VALUE + 1);
    }

    //-----------------------------------------------------------------------
    // withMonth()
    //-----------------------------------------------------------------------
View Full Code Here

Examples of org.threeten.bp.YearMonth.withYear()

    // withYear()
    //-----------------------------------------------------------------------
    @Test
    public void test_withYear() {
        YearMonth test = YearMonth.of(2008, 6);
        assertEquals(test.withYear(1999), YearMonth.of(1999, 6));
    }

    @Test
    public void test_withYear_int_noChange_equal() {
        YearMonth test = YearMonth.of(2008, 6);
View Full Code Here

Examples of org.threeten.bp.YearMonth.withYear()

    }

    @Test
    public void test_withYear_int_noChange_equal() {
        YearMonth test = YearMonth.of(2008, 6);
        assertEquals(test.withYear(2008), test);
    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withYear_tooLow() {
        YearMonth test = YearMonth.of(2008, 6);
View Full Code Here

Examples of org.threeten.bp.YearMonth.withYear()

    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withYear_tooLow() {
        YearMonth test = YearMonth.of(2008, 6);
        test.withYear(Year.MIN_VALUE - 1);
    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withYear_tooHigh() {
        YearMonth test = YearMonth.of(2008, 6);
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.