diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-26 16:19:52 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-26 16:19:52 (GMT) |
commit | 490602d6294052bf3308d9970f74e529d7e6da2b (patch) | |
tree | 9d8eedda0d38b5484fbb7b81e4d95a3122ce56a9 /Lib/_strptime.py | |
parent | 4c0db788e2500ca2140633d24b0c1c6c6d277a92 (diff) | |
download | cpython-490602d6294052bf3308d9970f74e529d7e6da2b.zip cpython-490602d6294052bf3308d9970f74e529d7e6da2b.tar.gz cpython-490602d6294052bf3308d9970f74e529d7e6da2b.tar.bz2 |
Fix julian day problem with strptime. Note: XXX about using 0, suggestions?
Diffstat (limited to 'Lib/_strptime.py')
-rw-r--r-- | Lib/_strptime.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/_strptime.py b/Lib/_strptime.py index 896c050..b7f7577 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -306,12 +306,14 @@ class TimeRE(dict): def __init__(self, locale_time=LocaleTime()): """Init inst with non-locale regexes and store LocaleTime object.""" + # XXX: should 0 be valid for: + # day (d), julian day (j), month (m), and hour12 (I)? super(TimeRE,self).__init__({ # The " \d" option is to make %c from ANSI C work 'd': r"(?P<d>3[0-1]|[0-2]\d|\d| \d)", 'H': r"(?P<H>2[0-3]|[0-1]\d|\d)", 'I': r"(?P<I>0\d|1[0-2]|\d)", - 'j': r"(?P<j>(?:3[0-5]\d|6[0-6])|[0-2]\d\d|\d)", + 'j': r"(?P<j>(?:3[0-5]\d|36[0-6])|[0-2]\d\d|\d\d|\d)", 'm': r"(?P<m>0\d|1[0-2]|\d)", 'M': r"(?P<M>[0-5]\d|\d)", 'S': r"(?P<S>6[0-1]|[0-5]\d|\d)", |