tryParse static method
An interval of a string ("../
Start and end instants must be formatted according to RFC 3339. See
DateTime.parse
for reference of valid inputs for start and end parts.
Returns null if an interval cannot be parsed.
Implementation
static Interval? tryParse(String text) {
try {
return Interval.parse(text);
} on Exception {
return null;
}
}