Package org.ocpsoft.prettytime.units

Examples of org.ocpsoft.prettytime.units.JustNow


      return calculateDuration(difference);
   }

   private void initTimeUnits()
   {
      addUnit(new JustNow());
      addUnit(new Millisecond());
      addUnit(new Second());
      addUnit(new Minute());
      addUnit(new Hour());
      addUnit(new Day());
View Full Code Here


      t.getUnit((Class<TimeUnit>) null);
   }
 
   @Test
   public void testGetUnit() {
       JustNow unit = t.getUnit(JustNow.class);
       assertNotNull(unit);
   }
View Full Code Here

       assertNotNull(unit);
   }
 
   @Test
   public void testChangeUnit() {
       JustNow unit = t.getUnit(JustNow.class);
       assertEquals(1000L * 60L * 5L, unit.getMaxQuantity());
       unit.setMaxQuantity(1);
       assertEquals(1, t.getUnit(JustNow.class).getMaxQuantity());
   }
View Full Code Here

TOP

Related Classes of org.ocpsoft.prettytime.units.JustNow

Copyright © 2018 www.massapicom. 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.