You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be null-returning variants for creating LocalDate(Time) instances. It shouldn't be necessary to catch an exception. This is especially useful when creating instances from user input.
val date = runCatching { LocalDate(userInput.year, userInput.month, userInput.day) }.getOrNull()
Also:
Instant.parse(…)
TimeZone.of(…)
etc.
Just like all similar stdlib functions have …OrNull variants.