toLocalDate

fun String.toLocalDate(vararg formats: String?): LocalDate?

Works off of String representations of date, without time, nor time zone. When formats are provided, each format is attempted in-order until one succeeds.

Return

LocalDate? Null means couldn't parse, else parsed LocalDate.

Parameters

this

String representation of LocalDate.

formats

String? vararg of formats to attempt when parsing.