Package org.apache.ws.jaxme.xs.util

Examples of org.apache.ws.jaxme.xs.util.XsDateTimeFormat.format()


    public void testFormatDateTime() {
        Calendar cal = getCalendar(TimeZone.getTimeZone("GMT"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        XsDateTimeFormat format = new XsDateTimeFormat();
        String got = format.format(cal);
        String expect = "2004-01-14T03:12:07Z";
        assertEquals(expect, got);

        cal = getCalendar(TimeZone.getTimeZone("GMT-03:00"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
View Full Code Here


        String expect = "2004-01-14T03:12:07Z";
        assertEquals(expect, got);

        cal = getCalendar(TimeZone.getTimeZone("GMT-03:00"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        got = format.format(cal);
        expect = "2004-01-14T03:12:07-03:00";
        assertEquals(expect, got);
    }

    public void testParseDateTime() throws ParseException {
View Full Code Here

        assertEquals(0, cal.get(Calendar.MINUTE));
        assertEquals(0, cal.get(Calendar.SECOND));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        assertEquals(TimeZone.getTimeZone("GMT"), cal.getTimeZone());

        String s = f.format(cal);
        assertEquals("2004-10-15T13:00:00Z", s);
    }

    /** Test for JAXME-44 in Jira.
     */
 
View Full Code Here

        assertEquals(0, cal.get(Calendar.MINUTE));
        assertEquals(0, cal.get(Calendar.SECOND));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        assertEquals(TimeZone.getTimeZone("GMT"), cal.getTimeZone());

        String s = f.format(cal);
        assertEquals("2004-10-15T13:00:00Z", s);
    }

    /** Test for JAXME-44 in Jira.
     */
 
View Full Code Here

     */
    public void testFormatDateTime() {
        Calendar cal = getCalendar(TimeZone.getTimeZone("GMT"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        XsDateTimeFormat format = new XsDateTimeFormat();
        String got = format.format(cal);
        String expect = "2004-01-14T03:12:07Z";
        assertEquals(expect, got);

        cal = getCalendar(TimeZone.getTimeZone("GMT-03:00"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
View Full Code Here

        String expect = "2004-01-14T03:12:07Z";
        assertEquals(expect, got);

        cal = getCalendar(TimeZone.getTimeZone("GMT-03:00"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        got = format.format(cal);
        expect = "2004-01-14T03:12:07-03:00";
        assertEquals(expect, got);
    }

    /** Test for
View Full Code Here

        assertEquals(0, cal.get(Calendar.MINUTE));
        assertEquals(0, cal.get(Calendar.SECOND));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        assertEquals(TimeZone.getTimeZone("GMT"), cal.getTimeZone());

        String s = f.format(cal);
        assertEquals("2004-10-15T13:00:00Z", s);
    }

    /** Test for JAXME-44 in Jira.
     */
 
View Full Code Here

     */
    public void testFormatDateTime() {
        Calendar cal = getCalendar(TimeZone.getTimeZone("GMT"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        XsDateTimeFormat format = new XsDateTimeFormat();
        String got = format.format(cal);
        String expect = "2004-01-14T03:12:07Z";
        assertEquals(expect, got);

        cal = getCalendar(TimeZone.getTimeZone("GMT-03:00"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
View Full Code Here

        String expect = "2004-01-14T03:12:07Z";
        assertEquals(expect, got);

        cal = getCalendar(TimeZone.getTimeZone("GMT-03:00"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        got = format.format(cal);
        expect = "2004-01-14T03:12:07-03:00";
        assertEquals(expect, got);
    }

    /** Test for
View Full Code Here

    public void testFormatDateTime() {
        Calendar cal = getCalendar(TimeZone.getTimeZone("GMT"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
        XsDateTimeFormat format = new XsDateTimeFormat();
        String got = format.format(cal);
        String expect = "2004-01-14T03:12:07Z";
        assertEquals(expect, got);

        cal = getCalendar(TimeZone.getTimeZone("GMT-03:00"));
        assertEquals(0, cal.get(Calendar.MILLISECOND));
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.