to Local Date Time
Works off of String representations of dateTime and parses through the following attempts in order when no format is present:
- First, tries parsing as LocalDateTime with default parser
- Lastly, if fails, tries parsing using a more flexible ISO 8601 format
When formats are provided, each format is attempted in-order until one succeeds. LocalDateTime? Null means couldn't parse, else parsed LocalDateTime.Return
Parameters
this
String representation of LocalDateTime.
formats
String? vararg of formats to attempt when parsing.