/**
* 验证日期格式是否为指定的日期格式
* 此方法验证无法准确验证'm-d'格式
* @param [type] $date [description]
* @param string $format [description]
* @return [type] [description]
*/
public function checkDateByFormat($date, $format='Y-m-d')
{
if(date($format, strtotime($date)) == $date)
return true;
return false;
}
注:
此方法验证无法准确验证’m-d’格式