Package com.ocpsoft.pretty.time

Examples of com.ocpsoft.pretty.time.PrettyTime.format()


      TemplateDirectiveBody body) throws TemplateException, IOException {
    TemplateDateModel dateModel =  (TemplateDateModel) params.get("date");
    Date date = dateModel!=null ? dateModel.getAsDate() : null;
    Assert.notNull(date, "Parameter date can not be null!");
    PrettyTime prettyTime = new PrettyTime(env.getLocale());
    env.getOut().write(prettyTime.format(date));
  }

}
View Full Code Here


    public ServerInfoSupportBean() {
    }
   
    public String getServerStartTime(){
        PrettyTime ptime = new PrettyTime();
        return ptime.format(utilBean.getServerStartTime());
       
    }
   
    public String getServerLocalTime(){
        return new SimpleDateFormat("hh:mm:ss").format(utilBean.getServerTime());
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.