标签:null pac form java cep etc stat pre pointer
package com.etc.jichu; import java.text.SimpleDateFormat; public class IsDate { public static boolean isValidDate(String str) { boolean convertSuccess=true; SimpleDateFormat format=new SimpleDateFormat("YYYY/MM/dd HH:mm"); try { format.setLenient(false);//不宽松地验证日期 format.parse(str); } catch (Exception e) { convertSuccess=false;//若 抛java.text.ParseException或者NullPointerException,就说明格式不对 } return convertSuccess; } }
Date---String is 合法的date 方法---
标签:null pac form java cep etc stat pre pointer
原文地址:http://www.cnblogs.com/ipetergo/p/6282294.html