Examples of whenIs()


Examples of org.apache.velocity.tools.generic.ComparisonDateTool.whenIs()

        ComparisonDateTool dateTool = (ComparisonDateTool)toolbox.get("date");
        assertNotNull(dateTool);
        Calendar date1 = new GregorianCalendar(2007,0,2);
        Calendar date2 = new GregorianCalendar(2007,1,15);
        /* test comparing */
        ComparisonDateTool.Comparison whenIs = dateTool.whenIs(date1, date2);
        assertEquals(0l, whenIs.getYears());
        assertEquals(1l, whenIs.getMonths());
        assertEquals(44l, whenIs.getDays());
        // the toolbox config says to skip months, so this should be in weeks
        assertStringEquals("6 weeks later", whenIs);
View Full Code Here

Examples of org.apache.velocity.tools.generic.ComparisonDateTool.whenIs()

        ComparisonDateTool dateTool = (ComparisonDateTool)toolbox.get("date");
        assertNotNull(dateTool);
        Calendar date1 = new GregorianCalendar(2007,0,2);
        Calendar date2 = new GregorianCalendar(2007,1,15);
        /* test comparing */
        ComparisonDateTool.Comparison whenIs = dateTool.whenIs(date1, date2);
        assertEquals(0l, whenIs.getYears());
        assertEquals(1l, whenIs.getMonths());
        assertEquals(44l, whenIs.getDays());
        // the toolbox config says to skip months, so this should be in weeks
        assertStringEquals("6 weeks later", whenIs);
View Full Code Here

Examples of org.apache.velocity.tools.generic.ComparisonDateTool.whenIs()

        ComparisonDateTool dateTool = (ComparisonDateTool)toolbox.get("date");
        assertNotNull(dateTool);
        Calendar date1 = new GregorianCalendar(2007,0,2);
        Calendar date2 = new GregorianCalendar(2007,1,15);
        /* test comparing */
        ComparisonDateTool.Comparison whenIs = dateTool.whenIs(date1, date2);
        assertEquals(0l, whenIs.getYears());
        assertEquals(1l, whenIs.getMonths());
        assertEquals(44l, whenIs.getDays());
        // the toolbox config says to skip months, so this should be in weeks
        assertStringEquals("6 weeks later", whenIs);
View Full Code Here

Examples of org.apache.velocity.tools.generic.ComparisonDateTool.whenIs()

        ComparisonDateTool dateTool = (ComparisonDateTool)toolbox.get("date");
        assertNotNull(dateTool);
        Calendar date1 = new GregorianCalendar(2007,0,2);
        Calendar date2 = new GregorianCalendar(2007,1,15);
        /* test comparing */
        ComparisonDateTool.Comparison whenIs = dateTool.whenIs(date1, date2);
        assertEquals(0l, whenIs.getYears());
        assertEquals(1l, whenIs.getMonths());
        assertEquals(44l, whenIs.getDays());
        // the toolbox config says to skip months, so this should be in weeks
        assertStringEquals("6 weeks later", whenIs);
View Full Code Here

Examples of org.apache.velocity.tools.generic.ComparisonDateTool.whenIs()

        ComparisonDateTool dateTool = (ComparisonDateTool)toolbox.get("date");
        assertNotNull(dateTool);
        Calendar date1 = new GregorianCalendar(2007,0,2);
        Calendar date2 = new GregorianCalendar(2007,1,15);
        /* test comparing */
        ComparisonDateTool.Comparison whenIs = dateTool.whenIs(date1, date2);
        assertEquals(0l, whenIs.getYears());
        assertEquals(1l, whenIs.getMonths());
        assertEquals(44l, whenIs.getDays());
        // the toolbox config says to skip months, so this should be in weeks
        assertStringEquals("6 weeks later", whenIs);
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.