core / io.islandtime / kotlin.String / toDateTime

toDateTime

(iosArm64) fun String.toDateTime(): DateTime
(iosX64) fun String.toDateTime(): DateTime
(jvm) fun String.toDateTime(): DateTime
(macosX64) fun String.toDateTime(): DateTime

Parse a string in ISO-8601 extended calendar date format into a DateTime -- for example, "2019-08-22T18:00" or "2019-08-22 18:00:30.123456789"

(iosArm64) fun String.toDateTime(parser: DateTimeParser): DateTime
(iosX64) fun String.toDateTime(parser: DateTimeParser): DateTime
(jvm) fun String.toDateTime(parser: DateTimeParser): DateTime
(macosX64) fun String.toDateTime(parser: DateTimeParser): DateTime

Parse a string into a DateTime using a DateTimeParser capable of supplying the necessary fields