Parse ISO date strings in Python with datetime.fromisoformat

Parse ISO date strings in Python with datetime.fromisoformat

If a Python string contains an ISO-formatted date, skip strptime and use datetime.fromisoformat:

import datetime as dt
dt.datetime.fromisoformat('2026-04-12')  # returns datetime at midnight
dt.datetime.fromisoformat('2026-04-12 12:34:56') # returns datetime at 12:34:56