Recently, I was working with Daf and Rob on a little offline wiki project — more on that soon — and we realized that we needed to parse some dates in ISO 8601 format. One of us wondered out loud if there was a Python module that could help us. I offered to take a look.
Turns out, less than two months before, someone had uploaded just such a module into Debian. The maintainer? Me.
Awesome!! Good job anticipating your future need. :-)
I love it when my brain hiccups like that…and it happens more frequently than I would like to admit.
> Awesome!! Good job anticipating your future need. :-)
^
This :D
Congrats you are now old!
The thing that always happens to me to to be googling for some error string and the first hit is a bug in the Debian BTS that I either filed, triaged, or solved.
Alternatively, have you taken a look at python-dateutil (also in Debian, and ported to Python 3, though apparently not both at the same time)?
Use is easy:
>>> import dateutil.parser
>>> dateutil.parser.parse(‘2007-06-20T12:34:40+03:00’)
datetime.datetime(2007, 6, 20, 12, 34, 40, tzinfo=tzoffset(None, 10800))
I prefer http://pypi.python.org/pypi/isodate which seems more up to date.
Hahahah, yes, absolutely, been there.
Too much beer on my brain in my case, I guess :)
Nice one. This takes the analogy in http://mdzlog.alcor.net/2009/12/26/excellent-adventures-in-free-software/ to its logical conclusion.