Human-readable time intervals convered to timedelta-acceptable format?
I’m using Python 3.10. I want to convert strings such as “10 MINUTES”, “3 DAYS”, “5 WEEKS”, “42 SECONDS”, etc. into something that datetime.timedelta
can parse.
I’m using Python 3.10. I want to convert strings such as “10 MINUTES”, “3 DAYS”, “5 WEEKS”, “42 SECONDS”, etc. into something that datetime.timedelta
can parse.