Examples of withMonth()


Examples of org.threeten.bp.LocalDate.withMonth()

    int year = endDate.getYear();
    Month month = startDate.getMonth();
    LocalDate date = startDate.withMonth(month.getValue()).withDayOfMonth(_dayOfMonth);
    if (date.isBefore(startDate)) {
      month = month.plus(1);
      date = date.withMonth(month.getValue());
    }
    year = date.getYear();
    while (!date.isAfter(endDate)) {
      dates.add(date);
      month = month.plus(1);
View Full Code Here

Examples of org.threeten.bp.MonthDay.withMonth()

    }

    @Test
    public void test_withMonth_int_noChangeEqual() {
        MonthDay test = MonthDay.of(6, 30);
        assertEquals(test.withMonth(6), test);
    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withMonth_tooLow() {
        MonthDay.of(6, 30).withMonth(0);
View Full Code Here

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

    // withMonth()
    //-----------------------------------------------------------------------
    @Test
    public void test_withMonth() {
        YearMonth test = YearMonth.of(2008, 6);
        assertEquals(test.withMonth(1), YearMonth.of(2008, 1));
    }

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

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

    }

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

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

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

    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withMonth_tooLow() {
        YearMonth test = YearMonth.of(2008, 6);
        test.withMonth(0);
    }

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

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

    }

    @Test(expectedExceptions=DateTimeException.class)
    public void test_withMonth_tooHigh() {
        YearMonth test = YearMonth.of(2008, 6);
        test.withMonth(13);
    }

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

Examples of org.threeten.bp.ZonedDateTime.withMonth()

    int year = endDate.getYear();
    Month month = startDate.getMonth();
    ZonedDateTime date = startDate.withMonth(month.getValue()).withDayOfMonth(_dayOfMonth);
    if (date.isBefore(startDate)) {
      month = month.plus(1);
      date = date.withMonth(month.getValue());
    }
    year = date.getYear();
    while (!date.isAfter(endDate)) {
      dates.add(date);
      month = month.plus(1);
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.