Skip to content

Instantly share code, notes, and snippets.

@jerith
Created August 19, 2011 14:24
Show Gist options
  • Save jerith/1156913 to your computer and use it in GitHub Desktop.
Save jerith/1156913 to your computer and use it in GitHub Desktop.
def parse_8601(timestr):
"""Parse an ISO-8601 timestamp.
:param timestr: String containing an ISO-8601 timestamp.
:returns: Python :class:`~datetime.datetime` instance.
This only parses a common subset of the standard, but Python's
standard library (as of 2.5, at least) does not have a suitable
parser and we may not want to depend on thrid-party libraries
everywhere this is used.
"""
# Do something here...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment