src/Paliari/DateTime/TDateTime.php
protected static function prepareDate($date)
    {
        if (null === $date) {
            return null;
        }
        if ($date instanceof DateTime) {
            return static::timeToString($date->getTimestamp());
        } elseif (is_numeric($date)) {
            return static::timeToString($date);
        } elseif (is_array($date)) {
            return @$date['date'];
        } elseif (self::hasTimestamp($date)) {
            return static::timeToString($date->getTimestamp());
        } elseif (is_string($date)) {
            return false !== strtotime($date) ? $date : null;
        }

        return null;
    }
protected static function prepareDate($date)
    {
        if (null === $date) {
            return null;
        }
        if ($date instanceof DateTime) {
            return static::timeToString($date->getTimestamp());
        } elseif (is_numeric($date)) {
            return static::timeToString($date);
        } elseif (is_array($date)) {
            return @$date['date'];
        } elseif (self::hasTimestamp($date)) {
            return static::timeToString($date->getTimestamp());
        } elseif (is_string($date)) {
            return false !== strtotime($date) ? $date : null;
        }

        return null;
    }
protected static function prepareDate ( $ date ) { if ( null === $ date ) { return null ; } if ( $ date instanceof DateTime ) { return static :: timeToString ( $ date -> getTimestamp ( ) ) ; } elseif ( is_numeric ( $ date ) ) { return static :: timeToString ( $ date ) ; } elseif ( is_array ( $ date ) ) { return @ $ date [ 'date' ] ; } elseif ( self :: hasTimestamp ( $ date ) ) { return static :: timeToString ( $ date -> getTimestamp ( ) ) ; } elseif ( is_string ( $ date ) ) { return false !== strtotime ( $ date ) ? $ date : null ; } return null ; }
Prepara data para validar.

@param mixed $date

@return null|string se for uma data valida retorna string no formato universal ou falso caso contrario.
Prepara data para validar .