src/Value/DateTime/DateTime.php
public static function fromXml(\DOMNodeList $xml)
    {
        $value = null;
        if ($xml->length > 0) {
            $value = new \DateTimeImmutable($xml->item(0)->textContent);
        }
        return new static($value);
    }
public static function fromXml(\DOMNodeList $xml)
    {
        $value = null;
        if ($xml->length > 0) {
            $value = new \DateTimeImmutable($xml->item(0)->textContent);
        }
        return new static($value);
    }
public static function fromXml ( \ DOMNodeList $ xml ) { $ value = null ; if ( $ xml -> length > 0 ) { $ value = new \ DateTimeImmutable ( $ xml -> item ( 0 ) -> textContent ) ; } return new static ( $ value ) ; }
Builds a DateTime object from XML.

@param \DOMNodeList $xml
The xml tag containing the date.

@return DateTime
A DateTime object.
Builds a DateTime object from XML .