Sample extending Java 8 Temporal classes to render an ISO formatted string
suggest changeWith this declaration:
fun Temporal.toIsoString(): String = DateTimeFormatter.ISO_INSTANT.format(this)
You can now simply:
val dateAsString = someInstant.toIsoString()
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents