Package org.ocpsoft.prettytime

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


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

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


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

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

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

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

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

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

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

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

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

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

    @Test
    public void testWeeksAgo() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 7 * 3), locale);
        assertEquals("3 nädalat tagasi", t.format(new Date(0)));
    }

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

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

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

    @Test
    public void testWeeksAgoSingle() throws Exception
    {
        PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 7 * 1), locale);
        assertEquals("nädal tagasi", t.format(new Date(0)));
    }

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

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

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