jetbrick-commons/src/main/java/jetbrick/lang/DateUtils.java
public static Date parseUsingPattern(String date, String pattern) {
        SimpleDateFormat df = new SimpleDateFormat(pattern);
        df.setLenient(false);

        try {
            ParsePosition pp = new ParsePosition(0);
            Date d = df.parse(date, pp);
            if (d != null && pp.getIndex() != date.length()) {
                return d;
            }
        } catch (Exception e) {
        }
        return null;
    }
public static Date parseUsingPattern(String date, String pattern) {
        SimpleDateFormat df = new SimpleDateFormat(pattern);
        df.setLenient(false);

        try {
            ParsePosition pp = new ParsePosition(0);
            Date d = df.parse(date, pp);
            if (d != null && pp.getIndex() != date.length()) {
                return d;
            }
        } catch (Exception e) {
        }
        return null;
    }
用指定的格式解析日期时间.

@param date      时间字符串
@param pattern   see {@link java.text.SimpleDateFormat}
@return          如果无法解析，那么返回 {@code null}