fromisoformat was added in Python 3.7 for date, datetime, and time classes. jdatettime already supports it for time (which inherits from the built-in pyhton class) and recently implemented it for date, but still needs to implement it for datetime class.
Also note that in Python 3.11 fromisoformat is more forgiving on the format of the input strings, for example date.fromisoformat now accepts YYYYMMDD format:
from datetime import date
date.fromisoformat('2019-12-04')
datetime.date(2019, 12, 4)
date.fromisoformat('20191204')
datetime.date(2019, 12, 4)
date.fromisoformat('2021-W01-1')
datetime.date(2021, 1, 4)
Changed in version 3.11: Previously, this method only supported the format YYYY-MM-DD.
fromisoformat
was added in Python 3.7 fordate
,datetime
, andtime
classes.jdatettime
already supports it fortime
(which inherits from the built-in pyhton class) and recently implemented it fordate
, but still needs to implement it fordatetime
class.Also note that in Python 3.11
fromisoformat
is more forgiving on the format of the input strings, for exampledate.fromisoformat
now accepts YYYYMMDD format: