parseDate

external fun parseDate(str: String): Date

Parse date string of one of the following date formats:

  • ISO 8601 "YYYY-MM-DD"

  • Extended ISO 8601 with a signed year, e.g. "+012026-MM-DD" or "-0001-MM-DD"

A date that does not exist, such as "2026-02-30", is not parsed. Building it would carry the surplus into the next month or year and answer with a date that was never asked for.