>>> from dateutil.parser import parse
>>> parse("Jan. 1st, 1991", fuzzy=True)
datetime.datetime(1991, 1, 1, 0, 0)
This is a huge boon over the tedious and underfeatured time.strptime and similar. Unhelpfully, the documentation is non-existent.
Python, MySQL and Your Mom
No comments:
Post a Comment