toKotlinInstant

fun <Error class: unknown class>.toKotlinInstant(): Instant(source)

Converts the NSDate to the corresponding Instant.

Even though Darwin only uses millisecond precision, it is possible that date uses larger resolution, storing microseconds or even nanoseconds. In this case, the sub-millisecond parts of date are rounded to the nearest millisecond, given that they are likely to be conversion artifacts.

Converts the JS Date to the corresponding Instant.