orangy
"1987-06-02".toDate("yyyy-MM-dd”)
I suggest to avoid extension functions on very common types – they are polluting completion, and slows down compiler Consider using ordinary Dates.parse(format:String):Date
and Dates.tryParse(format:String):Date?
variants.