toIso

fun toIso(text: String): String

Rewrites a year in PostgreSQL's spelling back into the one kotlinx.datetime parses.

Lenient on purpose: a value already written the ISO way - by SQL, or by a version of this library that predates the translation - is returned untouched rather than refused.

Return

The same instant in ISO-8601.

Parameters

text

The value as it stood in the payload.