Patrício
val birthDate = LocalDate.parse("2000-3-10")
Exception in thread "main" kotlinx.datetime.DateTimeFormatException: java.time.format.DateTimeParseException: Text '2000-3-10' could not be parsed at index 5
package org.example import kotlinx.datetime.LocalDate import kotlinx.datetime.DateTimeFormatException fun main() { try { val birthDate = LocalDate.parse("2000-3-10") } catch (e: DateTimeFormatException) { // ... } }
Cannot access 'DateTimeFormatException': it is internal in 'kotlinx.datetime'
import java.time.format.DateTimeParseException
Adrijan Rogan
IllegalArgumentException
A modern programming language that makes developers happier.