public static function getDateFromString($string) { if (empty($string)) { return '0000-00-00'; } return $string; }