Examples of DateFormat


Examples of org.eweb4j.mvc.action.annotation.DateFormat

    return paramValue;
  }

  private Date getDateParam(Annotation[] anns, String paramValue)
      throws Exception {
    DateFormat dateAnn = null;
    for (Annotation a : anns) {
      if (a == null)
        continue;

      if (!a.annotationType().isAssignableFrom(DateFormat.class))
        continue;

      dateAnn = (DateFormat) a;
      break;
    }

    String pattern = "yyyy-MM-dd HH:mm:ss";
    if (dateAnn != null)
      pattern = dateAnn.value();

    SimpleDateFormat sdf = new SimpleDateFormat(pattern);
    return sdf.parse(paramValue);
  }
View Full Code Here

Examples of org.eweb4j.mvc.validator.annotation.DateFormat

    return paramValue;
  }

  private Date getDateParam(Annotation[] anns, String paramValue)
      throws Exception {
    DateFormat dateAnn = null;
    for (Annotation a : anns) {
      if (a == null)
        continue;

      if (!a.annotationType().isAssignableFrom(DateFormat.class))
        continue;

      dateAnn = (DateFormat) a;
      break;
    }

    String pattern = "yyyy-MM-dd HH:mm:ss";
    if (dateAnn != null)
      pattern = dateAnn.value();

    SimpleDateFormat sdf = new SimpleDateFormat(pattern);
    return sdf.parse(paramValue);
  }
View Full Code Here

Examples of org.outerj.i18n.DateFormat

        this.variant = DATE;
        this.localizedPatterns = new LocaleMap();
    }

    public Object convertFromString(String value, Locale locale, Convertor.FormatCache formatCache) {
        DateFormat dateFormat = getDateFormat(locale, formatCache);
        try {
            return dateFormat.parse(value);
        } catch (ParseException e) {
            return null;
        }
    }
View Full Code Here

Examples of railo.runtime.format.DateFormat

              catch (PageException e) {
                ps.setPos(pos);
                    break;
              }
              sb.append('\'');
                  sb.append(new DateFormat(Locale.US).format(d,"yyyy-mm-dd"));
                  sb.append(' ');
                  sb.append(new TimeFormat(Locale.US).format(d,"HH:mm:ss"));
                  sb.append('\'');
                  ps.next();
                  continue outer;
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.