public static function normalize(\DateTime $date = null)
    {
        if (!empty($date)) {
            return $date->format(static::DATE_FORMAT);
        }

        return null;
    }
public static function normalize(\DateTime $date = null)
    {
        if (!empty($date)) {
            return $date->format(static::DATE_FORMAT);
        }

        return null;
    }
public static function normalize ( \ DateTime $ date = null ) { if ( ! empty ( $ date ) ) { return $ date -> format ( static :: DATE_FORMAT ) ; } return null ; }
Normalizes a DateTime to a string.

@param \DateTime|null $date

@return string|null
Normalizes a DateTime to a string .