src/LocalDateRange.php
public static function parse(string $text, DateTimeParser $parser = null) : LocalDateRange
    {
        if (! $parser) {
            $parser = IsoParsers::localDateRange();
        }

        return LocalDateRange::from($parser->parse($text));
    }
public static function parse(string $text, DateTimeParser $parser = null) : LocalDateRange
    {
        if (! $parser) {
            $parser = IsoParsers::localDateRange();
        }

        return LocalDateRange::from($parser->parse($text));
    }
public static function parse ( string $ text , DateTimeParser $ parser = null ) : LocalDateRange { if ( ! $ parser ) { $ parser = IsoParsers :: localDateRange ( ) ; } return LocalDateRange :: from ( $ parser -> parse ( $ text ) ) ; }
Obtains an instance of `LocalDateRange` from a text string.

Partial representations are allowed; for example, the following representations are equivalent:

- `2001-02-03/2001-02-04`
- `2001-02-03/02-04`
- `2001-02-03/04`

@param string              $text   The text to parse.
@param DateTimeParser|null $parser The parser to use, defaults to the ISO 8601 parser.

@return LocalDateRange

@throws DateTimeException      If either of the dates is not valid.
@throws DateTimeParseException If the text string does not follow the expected format.
Obtains an instance of LocalDateRange from a text string .