private function convertTimestampToDateTime($date)
    {
        if (false === ($date instanceof \DateTime) && false === is_int($date)) {
            throw new InvalidArgumentException(
                'Page::convertTimestampToDateTime() expect date argument to be an integer or an instance of \DateTime'
            );
        } elseif (is_int($date)) {
            $date = new \DateTime(date('c', $date));
        }

        return $date;
    }
private function convertTimestampToDateTime($date)
    {
        if (false === ($date instanceof \DateTime) && false === is_int($date)) {
            throw new InvalidArgumentException(
                'Page::convertTimestampToDateTime() expect date argument to be an integer or an instance of \DateTime'
            );
        } elseif (is_int($date)) {
            $date = new \DateTime(date('c', $date));
        }

        return $date;
    }
private function convertTimestampToDateTime ( $ date ) { if ( false === ( $ date instanceof \ DateTime ) && false === is_int ( $ date ) ) { throw new InvalidArgumentException ( 'Page::convertTimestampToDateTime() expect date argument to be an integer or an instance of \DateTime' ) ; } elseif ( is_int ( $ date ) ) { $ date = new \ DateTime ( date ( 'c' , $ date ) ) ; } return $ date ; }
Convert provided date to DateTime.

@param  integer|\Datetime    $date               The date to convert to \DateTime.

@return DateTime

@throws InvalidArgumentException                 Raises if provided date is not an integer or an instance of \DateTime
Convert provided date to DateTime .