Package org.ocpsoft.pretty.time

Examples of org.ocpsoft.pretty.time.PrettyTime


   public String getSecondsUntilGranted()
   {
      DateTime time = new DateTime();
      int secondsRemain = 60 - time.getSecondOfMinute();
      DateTime deniedTime = time.plusSeconds(secondsRemain);
      PrettyTime prettyTime = new PrettyTime();
      prettyTime.setUnits(new Second(prettyTime.getLocale()));
      return prettyTime.format(deniedTime.toDate());
   }
View Full Code Here


   public String getSecondsUntilDenied()
   {
      DateTime time = new DateTime();
      int secondsRemain = 30 - time.getSecondOfMinute();
      DateTime grantedTime = time.plusSeconds(secondsRemain);
      PrettyTime prettyTime = new PrettyTime();
      prettyTime.setUnits(new Second(prettyTime.getLocale()));
      return prettyTime.format(grantedTime.toDate());
   }
View Full Code Here

    return _state;
  }

  /* Added by Per Henrik Lausten */
  public String getPrettyTime() {
    PrettyTime p = new PrettyTime();
    return p.format(this.getPublicationDate());
  }
View Full Code Here

TOP

Related Classes of org.ocpsoft.pretty.time.PrettyTime

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.