Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlCalendar.peek()


        Date gcd = gc.getTime();
        Assert.assertEquals(gdd, gcd);
       
        // set up 2/29, and read out Feb 29 in the year 1 BC.
        XmlCalendar gregcal = new GDate("--02-29").getCalendar();
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
        Assert.assertEquals(1, gregcal.peek(Calendar.YEAR));
        Assert.assertEquals(0, gregcal.peek(Calendar.ERA));
        // repeat some tests to make sure it's stable.
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
View Full Code Here


        Assert.assertEquals(gdd, gcd);
       
        // set up 2/29, and read out Feb 29 in the year 1 BC.
        XmlCalendar gregcal = new GDate("--02-29").getCalendar();
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
        Assert.assertEquals(1, gregcal.peek(Calendar.YEAR));
        Assert.assertEquals(0, gregcal.peek(Calendar.ERA));
        // repeat some tests to make sure it's stable.
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
View Full Code Here

       
        // set up 2/29, and read out Feb 29 in the year 1 BC.
        XmlCalendar gregcal = new GDate("--02-29").getCalendar();
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
        Assert.assertEquals(1, gregcal.peek(Calendar.YEAR));
        Assert.assertEquals(0, gregcal.peek(Calendar.ERA));
        // repeat some tests to make sure it's stable.
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
View Full Code Here

        // set up 2/29, and read out Feb 29 in the year 1 BC.
        XmlCalendar gregcal = new GDate("--02-29").getCalendar();
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
        Assert.assertEquals(1, gregcal.peek(Calendar.YEAR));
        Assert.assertEquals(0, gregcal.peek(Calendar.ERA));
        // repeat some tests to make sure it's stable.
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));

        // now try some setters
View Full Code Here

        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
        Assert.assertEquals(1, gregcal.peek(Calendar.YEAR));
        Assert.assertEquals(0, gregcal.peek(Calendar.ERA));
        // repeat some tests to make sure it's stable.
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));

        // now try some setters
        gregcal = new GDate("--02-29").getCalendar();
        gregcal.set(Calendar.MONTH, 10);
View Full Code Here

        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));
        Assert.assertEquals(1, gregcal.peek(Calendar.YEAR));
        Assert.assertEquals(0, gregcal.peek(Calendar.ERA));
        // repeat some tests to make sure it's stable.
        Assert.assertEquals(29, gregcal.peek(Calendar.DAY_OF_MONTH));
        Assert.assertEquals(2 - 1, gregcal.peek(Calendar.MONTH));

        // now try some setters
        gregcal = new GDate("--02-29").getCalendar();
        gregcal.set(Calendar.MONTH, 10);
        Assert.assertEquals("--11-29", gregcal.toString());
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.