to Date
Converts a string to a Date.
The string is assumed to be an ISO-8601 calendar date in extended format. For example, 2010-10-05. The output of Date.toString can be safely parsed using this method.
Throws
if parsing fails
if the parsed date is invalid
fun String.toDate(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): Date
Content copied to clipboard
Converts a string to a Date using a specific parser.
A set of predefined parsers can be found in DateTimeParsers.
Any custom parser must be capable of supplying one of the following field combinations:
Throws
if parsing fails
if the parsed date is invalid