java判断时间格式 //格式必须为“YYYY-MM-dd”

/** * 判断时间格式 格式必须为“YYYY-MM-dd” * 2004-2-30 是无效的 * 2003-2-29 是无效的 * @param sDate * @return */ public boolean isValidDate(String str) { //String str = "2007-01-02"; DateFormat formatter
相关文章
相关标签/搜索