public static function Validate($date, $format = DATEFORMAT::YMD, $separator = "/")
	{
		$timestamp = DateUtil::TimeStampFromStr($date, $format);
		$dateCheck = DateUtil::FormatDate($timestamp, $format, $separator, true);

		$date = $date . substr('--/--/---- 00:00:00', strlen($date));

		$timestamp2 = DateUtil::TimeStampFromStr($dateCheck, $format);
		return ($timestamp == $timestamp2) && ($date == $dateCheck);
	}
public static function Validate($date, $format = DATEFORMAT::YMD, $separator = "/")
	{
		$timestamp = DateUtil::TimeStampFromStr($date, $format);
		$dateCheck = DateUtil::FormatDate($timestamp, $format, $separator, true);

		$date = $date . substr('--/--/---- 00:00:00', strlen($date));

		$timestamp2 = DateUtil::TimeStampFromStr($dateCheck, $format);
		return ($timestamp == $timestamp2) && ($date == $dateCheck);
	}
public static function Validate ( $ date , $ format = DATEFORMAT :: YMD , $ separator = "/" ) { $ timestamp = DateUtil :: TimeStampFromStr ( $ date , $ format ) ; $ dateCheck = DateUtil :: FormatDate ( $ timestamp , $ format , $ separator , true ) ; $ date = $ date . substr ( '--/--/---- 00:00:00' , strlen ( $ date ) ) ; $ timestamp2 = DateUtil :: TimeStampFromStr ( $ dateCheck , $ format ) ; return ( $ timestamp == $ timestamp2 ) && ( $ date == $ dateCheck ) ; }
Check if a date is Valid

@param type $date
@param type $format
@param type $separator
@param type $hour
@return type
Check if a date is Valid