--- DateTime.py.orig 2006-09-12 21:57:47.000000000 +0000 +++ DateTime.py 2006-09-12 22:19:51.000000000 +0000 @@ -731,7 +731,7 @@ elif isinstance(arg, (unicode, str)): # Date/time string - if arg.find(' ')==-1 and arg[4]=='-': + if arg.find(' ')==-1 and ( arg[4]=='-' or arg[4:6].isdigit() ): yr,mo,dy,hr,mn,sc,tz=self._parse_iso8601(arg) else: yr,mo,dy,hr,mn,sc,tz=self._parse(arg, datefmt) @@ -1742,7 +1742,7 @@ month=day=1 hour=minute=seconds=hour_off=min_off=0 - datereg = re.compile('([0-9]{4})(-([0-9][0-9]))?(-([0-9][0-9]))?') + datereg = re.compile('([0-9]{4})(-?([0-9][0-9]))?(-?([0-9][0-9]))?') timereg = re.compile('T([0-9]{2})(:([0-9][0-9]))?(:([0-9][0-9]))?(\.[0-9]{1,20})?') zonereg = re.compile('([+-][0-9][0-9])(:?([0-9][0-9]))')