Code

be able to parse b0rken Interval serialisation
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 10 Oct 2002 08:24:37 +0000 (08:24 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 10 Oct 2002 08:24:37 +0000 (08:24 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1339 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/date.py

index d279fdff17130c613501dd8d556350cdf9c95d54..d074064d07447fd6d3a349256d6a501bdcf8ca0b 100644 (file)
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: date.py,v 1.33 2002-10-10 07:18:02 richard Exp $
+# $Id: date.py,v 1.34 2002-10-10 08:24:37 richard Exp $
 
 __doc__ = """
 Date, time and time interval handling.
@@ -362,7 +362,7 @@ class Interval:
             \s*((?P<d>\d+\s*)d)?    # day
             \s*(((?P<H>\d+):(?P<M>\d+))?(:(?P<S>\d+))?)?   # time
             \s*''', re.VERBOSE), serialised_re=re.compile('''
-            (?P<s>[+-])(?P<y>\d{4})(?P<m>\d{2})(?P<d>\d{2})
+            (?P<s>[+-])?1?(?P<y>([ ]{3}\d|\d{4}))(?P<m>\d{2})(?P<d>\d{2})
             (?P<H>\d{2})(?P<M>\d{2})(?P<S>\d{2})''', re.VERBOSE)):
         ''' set the date to the value in spec
         '''