src/CloudTrail/LogFileIterator.php
private function normalizeDateValue($date)
    {
        if (is_string($date)) {
            $date = strtotime($date);
        } elseif ($date instanceof \DateTime) {
            $date = $date->format('U');
        } elseif (!is_int($date)) {
            throw new \InvalidArgumentException('Date values must be a '
                . 'string, an int, or a DateTime object.');
        }

        return $date;
    }
private function normalizeDateValue($date)
    {
        if (is_string($date)) {
            $date = strtotime($date);
        } elseif ($date instanceof \DateTime) {
            $date = $date->format('U');
        } elseif (!is_int($date)) {
            throw new \InvalidArgumentException('Date values must be a '
                . 'string, an int, or a DateTime object.');
        }

        return $date;
    }
private function normalizeDateValue ( $ date ) { if ( is_string ( $ date ) ) { $ date = strtotime ( $ date ) ; } elseif ( $ date instanceof \ DateTime ) { $ date = $ date -> format ( 'U' ) ; } elseif ( ! is_int ( $ date ) ) { throw new \ InvalidArgumentException ( 'Date values must be a ' . 'string, an int, or a DateTime object.' ) ; } return $ date ; }
Normalizes a date value to a unix timestamp

@param string|\DateTime|int $date

@return int
@throws \InvalidArgumentException if the value cannot be converted to
a timestamp
Normalizes a date value to a unix timestamp