src/Util/DateTimeUtil.php
public static function valid(string $date, string $format): bool {
        return date($format, strtotime($date)) === $date;

    }
public static function valid(string $date, string $format): bool {
        return date($format, strtotime($date)) === $date;

    }
public static function valid ( string $ date , string $ format ) : bool { return date ( $ format , strtotime ( $ date ) ) === $ date ; }
Whether string is a valid date or not

@param string $date
@param string $format
@return bool
Whether string is a valid date or not