Milliner/src/Service/MillinerService.php
protected function getModifiedTimestamp(array $jsonld)
    {
        $modified = $this->getFirstPredicate(
            $jsonld,
            $this->modifiedDatePredicate
        );

        if (empty($modified)) {
            throw new \RuntimeException(
                "Could not parse {$this->modifiedDatePredicate} from " . json_encode($jsonld),
                500
            );
        }

        $date = \DateTime::createFromFormat(
            \DateTime::W3C,
            $modified
        );

        return $date->getTimestamp();
    }
protected function getModifiedTimestamp(array $jsonld)
    {
        $modified = $this->getFirstPredicate(
            $jsonld,
            $this->modifiedDatePredicate
        );

        if (empty($modified)) {
            throw new \RuntimeException(
                "Could not parse {$this->modifiedDatePredicate} from " . json_encode($jsonld),
                500
            );
        }

        $date = \DateTime::createFromFormat(
            \DateTime::W3C,
            $modified
        );

        return $date->getTimestamp();
    }
protected function getModifiedTimestamp ( array $ jsonld ) { $ modified = $ this -> getFirstPredicate ( $ jsonld , $ this -> modifiedDatePredicate ) ; if ( empty ( $ modified ) ) { throw new \ RuntimeException ( "Could not parse {$this->modifiedDatePredicate} from " . json_encode ( $ jsonld ) , 500 ) ; } $ date = \ DateTime :: createFromFormat ( \ DateTime :: W3C , $ modified ) ; return $ date -> getTimestamp ( ) ; }
Extracts a modified date from jsonld and returns it as a timestamp.

@param array $jsonld

@return int

@throws \RuntimeException
Extracts a modified date from jsonld and returns it as a timestamp .