Package org.ocpsoft.prettytime.impl

Examples of org.ocpsoft.prettytime.impl.ResourcesTimeFormat


      addUnit(new Millennium());
   }

   private void addUnit(ResourcesTimeUnit unit)
   {
      registerUnit(unit, new ResourcesTimeFormat(unit));
   }
View Full Code Here


   public void testCalculatePreciseDuration()
   {
       PrettyTime prettyTime = new PrettyTime();
       prettyTime.clearUnits();
       Minute minutes = new Minute();
       prettyTime.registerUnit(minutes, new ResourcesTimeFormat(minutes));
       assertEquals("40 minutes ago",
               prettyTime.format(prettyTime.calculatePreciseDuration(new Date(new Date().getTime() - 40*60*1000 - 40*1000))));
   }
View Full Code Here

TOP

Related Classes of org.ocpsoft.prettytime.impl.ResourcesTimeFormat

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.