Package org.ocpsoft.prettytime

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


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

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


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

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

    @Test
    public void testMonthAgo() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 30 * 1), locale);
        assertEquals("kuu tagasi", t.format(new Date(0)));
    }

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

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

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

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

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

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

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

    @Test
    public void testYearAgo() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 366 * 1), locale);
        assertEquals("aasta tagasi", t.format(new Date(0)));
    }

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

    @Test
    public void testDecadesFromNow() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(0), locale);
        assertEquals("3 aastakümne pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 10 * 3)));
    }

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

    @Test
    public void testDecadesAgo() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 365 * 10 * 3), locale);
        assertEquals("3 aastakümmet tagasi", t.format(new Date(0)));
    }

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

    @Test
    public void testDecadeFromNow() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(0), locale);
        assertEquals("aastakümne pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 11 * 1)));
    }

    @Test
    public void testDecadeAgo() 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.