Package org.joda.time

Examples of org.joda.time.LocalDate$Property


        LocalDate expected = new LocalDate(-1, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(2));
    }

    public void test_plusYears_negativeToZero() {
        LocalDate date = new LocalDate(-3, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(1, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(3));
    }
View Full Code Here


        LocalDate expected = new LocalDate(1, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(3));
    }

    public void test_plusYears_negativeToPositive() {
        LocalDate date = new LocalDate(-3, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(2, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(4));
    }
View Full Code Here

        assertEquals(expected, date.plusYears(4));
    }

    //-----------------------------------------------------------------------
    public void test_plusYears_positiveToPositive_crossCutover() {
        LocalDate date = new LocalDate(3, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(2007, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(2004));
    }
View Full Code Here

        LocalDate expected = new LocalDate(2007, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(2004));
    }

    public void test_plusYears_positiveToZero_crossCutover() {
        LocalDate date = new LocalDate(2003, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(-1, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(-2003));
    }
View Full Code Here

        LocalDate expected = new LocalDate(-1, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(-2003));
    }

    public void test_plusYears_positiveToNegative_crossCutover() {
        LocalDate date = new LocalDate(2003, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(-2, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(-2004));
    }
View Full Code Here

        LocalDate expected = new LocalDate(-2, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(-2004));
    }

    public void test_plusYears_negativeToPositive_crossCutover() {
        LocalDate date = new LocalDate(-3, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(2002, 6, 30, GJ_CHRONOLOGY);
        assertEquals(expected, date.plusYears(2004));
    }
View Full Code Here

        assertEquals(expected, date.plusYears(2004));
    }

    //-----------------------------------------------------------------------
    public void test_plusWeekyears_positiveToZero_crossCutover() {
        LocalDate date = new LocalDate(2003, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(-1, 6, 30, GJ_CHRONOLOGY).withWeekOfWeekyear(date.getWeekOfWeekyear()).withDayOfWeek(date.getDayOfWeek());
        assertEquals(expected, date.weekyear().addToCopy(-2003));
    }
View Full Code Here

        LocalDate expected = new LocalDate(-1, 6, 30, GJ_CHRONOLOGY).withWeekOfWeekyear(date.getWeekOfWeekyear()).withDayOfWeek(date.getDayOfWeek());
        assertEquals(expected, date.weekyear().addToCopy(-2003));
    }

    public void test_plusWeekyears_positiveToNegative_crossCutover() {
        LocalDate date = new LocalDate(2003, 6, 30, GJ_CHRONOLOGY);
        LocalDate expected = new LocalDate(-2, 6, 30, GJ_CHRONOLOGY).withWeekOfWeekyear(date.getWeekOfWeekyear()).withDayOfWeek(date.getDayOfWeek());
        assertEquals(expected, date.weekyear().addToCopy(-2004));
    }
View Full Code Here

        assertEquals(expected, date.weekyear().addToCopy(-2004));
    }

    //-----------------------------------------------------------------------
    public void test_cutoverPreZero() {
        DateTime cutover = new LocalDate(-2, 6, 30, ISOChronology.getInstanceUTC()).toDateTimeAtStartOfDay(DateTimeZone.UTC);
        try {
            GJChronology.getInstance(DateTimeZone.UTC, cutover);
            fail();
        } catch (IllegalArgumentException ex) {
            // expected
View Full Code Here

       
        final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
       
        final JsonRepresentation argRepr = updateLink.getArguments();
       
        final LocalDate ld = new LocalDate(2013,5,1);
        final LocalDateTime ldt = new LocalDateTime(2013,2,1,14,15,0);
        final DateTime dt = new DateTime(2013,2,1,14,15,0, DateTimeZone.UTC);
        final String s = "New string";
       
        argRepr.mapPut("localDateProperty.value", "2013-05-01");
View Full Code Here

TOP

Related Classes of org.joda.time.LocalDate$Property

Copyright © 2018 www.massapicom. 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.