toLocaldate

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

Works off of String representations of date, without time, nor time zone. Every provided 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

Optional parsing formats. Null/blank entries attempt default ISO parsing.