Code

bad RE
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 23 Sep 2002 07:27:23 +0000 (07:27 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 23 Sep 2002 07:27:23 +0000 (07:27 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1210 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/date.py

index a016133ddc4c2e7b08a3387c06cd21b58a06b520..e320e477ded4c0a403103ce76b7e94f46e0ed3c1 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.30 2002-09-23 07:09:15 richard Exp $
+# $Id: date.py,v 1.31 2002-09-23 07:27:23 richard Exp $
 
 __doc__ = """
 Date, time and time interval handling.
@@ -215,11 +215,11 @@ class Date:
         return str
 
     def set(self, spec, offset=0, date_re=re.compile(r'''
-            (((?P<y>\d{4}-)?((?P<m>\d\d?)-(?P<d>\d\d?))?)? # yyyy-mm-dd
+            ((?P<y>\d\d\d\d-)?((?P<m>\d\d?)-(?P<d>\d\d?))?)? # yyyy-mm-dd
             (?P<n>\.)?                                     # .
             (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d))?)?  # hh:mm:ss
             (?P<o>.+)?                                     # offset
-            ''', re.VERBOSE), serialised_re=re.compile('''
+            ''', re.VERBOSE), serialised_re=re.compile(r'''
             (\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)
             ''', re.VERBOSE)):
         ''' set the date to the value in spec