to Date Range
Returns this interval with the precision reduced to just the date.
Converts a string to a DateRange.
The string is assumed to be an ISO-8601 time interval representation in extended format. The output of DateRange.toString can be safely parsed using this method.
Examples:
1990-01-04/1991-08-30../1991-08-301990-01-04/..../..(empty string)
Throws
if parsing fails
if the parsed time is invalid
fun String.toDateRange(parser: GroupedDateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): DateRange
Content copied to clipboard
Converts a string to a DateRange using a specific parser.
A set of predefined parsers can be found in DateTimeParsers.
Throws
if parsing fails
if the parsed range is invalid