Examples of formatUnrounded()


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

   {
      PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 3 + 1000 * 60 * 45));
      Duration duration = t.approximateDuration(new Date(0));

      assertEquals("4 hours ago", t.format(duration));
      assertEquals("3 hours ago", t.formatUnrounded(duration));
   }

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