|
|
|
@ -41,7 +41,7 @@ __all__ = ["parse_date", "ParseError"]
|
|
|
|
|
# Adapted from http://delete.me.uk/2005/03/iso8601.html
|
|
|
|
|
ISO8601_REGEX_RAW = "(?P<year>[0-9]{4})-(?P<month>[0-9]{1,2})-(?P<day>[0-9]{1,2})" \
|
|
|
|
|
"T(?P<hour>[0-9]{2}):(?P<minute>[0-9]{2})(:(?P<second>[0-9]{2})(\.(?P<fraction>[0-9]+))?)?" \
|
|
|
|
|
"(?P<timezone>Z|(([-+])([0-9]{2}):([0-9]{2})))?"
|
|
|
|
|
"(?P<timezone>Z|[-+][0-9]{2}(:?[0-9]{2})?)?"
|
|
|
|
|
ISO8601_REGEX = re.compile(ISO8601_REGEX_RAW)
|
|
|
|
|
TIMEZONE_REGEX = re.compile("(?P<prefix>[+-])(?P<hours>[0-9]{2}):?(?P<minutes>[0-9]{2})?")
|
|
|
|
|
|
|
|
|
|