DateTimeComponentsFallback
When using DataFrame.convert or DataColumn.convertTo to convert from String to a kotlinx-datetime type, like LocalDate, fails to parse, the DateTimeComponents fallback-mechanism kicks in.
Oftentimes it may namely be possible to parse the date-time string to the more flexible DateTimeComponents first and then convert that to LocalDate with a potential little loss of information.
This means we can successfully call:
columnOf("Mon, 30 Jun 2008 11:05:30 -0300").convertTo<LocalDate>()Content copied to clipboard
even though
columnOf("Mon, 30 Jun 2008 11:05:30 -0300").parse()Content copied to clipboard
would produce a DateTimeComponents column.
Take this mechanism into account when providing custom DateTimeFormats to the (global) ParserOptions.
For more information: See Parsing Date-time Strings on the documentation website.