Package org.ocpsoft.prettytime

Examples of org.ocpsoft.prettytime.PrettyTime.format()


    @Test
    public void testSecondsAgo() throws Exception
    {
        PrettyTime t = newPrettyTimeWOJustNow(new Date(1000 * 13), locale);
        assertEquals("13 sekundit tagasi", t.format(new Date(0)));
    }

    @Test
    public void testSecondFromNow() throws Exception
    {
View Full Code Here


    @Test
    public void testSecondFromNow() throws Exception
    {
        PrettyTime t = newPrettyTimeWOJustNow(new Date(0), locale);
        assertEquals("sekundi pärast", t.format(new Date(1000  * 1)));
    }

    @Test
    public void testSecondAgo() throws Exception
    {
View Full Code Here

    @Test
    public void testSecondAgo() throws Exception
    {
        PrettyTime t = newPrettyTimeWOJustNow(new Date(1000  * 1), locale);
        assertEquals("sekund tagasi", t.format(new Date(0)));
    }

    @Test
    public void testMinutesFromNow() throws Exception
    {
View Full Code Here

    @Test
    public void testMinutesFromNow() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(0), locale);
        assertEquals("13 minuti pärast", t.format(new Date(1000 * 60  * 13)));
    }

    @Test
    public void testMinutesAgo() throws Exception
    {
View Full Code Here

    @Test
    public void testMinutesAgo() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(1000 * 60 * 13), locale);
        assertEquals("13 minutit tagasi", t.format(new Date(0)));
    }

    @Test
    public void testMinuteFromNow() throws Exception
    {
View Full Code Here

    @Test
    public void testMinuteFromNow() throws Exception
    {
        PrettyTime t = newPrettyTimeWOJustNow(new Date(0), locale);
        assertEquals("minuti pärast", t.format(new Date(1000 * 60 * 1)));
    }

    @Test
    public void testMinuteAgo() throws Exception
    {
View Full Code Here

    @Test
    public void testMinuteAgo() throws Exception
    {
        PrettyTime t = newPrettyTimeWOJustNow(new Date(1000 * 60 * 1), locale);
        assertEquals("minut tagasi", t.format(new Date(0)));
    }

    @Test
    public void testHoursFromNow() throws Exception
    {
View Full Code Here

    @Test
    public void testHoursFromNow() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(0), locale);
        assertEquals("3 tunni pärast", t.format(new Date(1000 * 60 * 60 * 3)));
    }

    @Test
    public void testHoursAgo() throws Exception
    {
View Full Code Here

    @Test
    public void testHoursAgo() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 3), locale);
        assertEquals("3 tundi tagasi", t.format(new Date(0)));
    }

    @Test
    public void testHoursFromNowSingle() throws Exception
    {
View Full Code Here

    @Test
    public void testHoursFromNowSingle() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(0), locale);
        assertEquals("tunni pärast", t.format(new Date(1000 * 60 * 60 * 1)));
    }

    @Test
    public void testHoursAgoSingle() throws Exception
    {
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.