public static function fromString($string)
    {
        return ctype_digit($string)
            ? new static((int) $string)
            : self::fromNative(new \DateTime($string));
    }
public static function fromString($string)
    {
        return ctype_digit($string)
            ? new static((int) $string)
            : self::fromNative(new \DateTime($string));
    }
public static function fromString ( $ string ) { return ctype_digit ( $ string ) ? new static ( ( int ) $ string ) : self :: fromNative ( new \ DateTime ( $ string ) ) ; }
From String.

@param  $string
@return static
From String .