Package org.ocpsoft.prettytime

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


  @Test
  public void testMilliSecondAgo() throws Exception
  {
    PrettyTime t = newPrettyTimeWOJustNow(new Date(1), locale);
    assertEquals("millisekunti sitten", t.format(new Date(0)));
  }
 
  @Test
  public void testSecondsFromNow() throws Exception
  {
View Full Code Here


 
  @Test
  public void testSecondsFromNow() throws Exception
  {
    PrettyTime t = newPrettyTimeWOJustNow(new Date(0), locale);
    assertEquals("13 sekunnin päästä", t.format(new Date(1000 * 13)));
  }

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

  @Test
  public void testSecondsAgo() throws Exception
  {
    PrettyTime t = newPrettyTimeWOJustNow(new Date(1000 * 13), locale);
    assertEquals("13 sekuntia sitten", 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("sekunnin päästä", 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("sekunti sitten", 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 minuutin päästä", 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 minuuttia sitten", 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("minuutin päästä", 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("minuutti sitten", 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 tunnin päästä", t.format(new Date(1000 * 60 * 60 * 3)));
  }

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