comparison roundup/date.py @ 1266:b3279ec4837a

be able to parse b0rken Interval serialisation
author Richard Jones <richard@users.sourceforge.net>
date Thu, 10 Oct 2002 08:24:37 +0000
parents 85d71588a1cf
children b34adc9bcaf2
comparison
equal deleted inserted replaced
1265:6763080a959e 1266:b3279ec4837a
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: date.py,v 1.33 2002-10-10 07:18:02 richard Exp $ 18 # $Id: date.py,v 1.34 2002-10-10 08:24:37 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Date, time and time interval handling. 21 Date, time and time interval handling.
22 """ 22 """
23 23
360 \s*((?P<m>\d+\s*)m)? # month 360 \s*((?P<m>\d+\s*)m)? # month
361 \s*((?P<w>\d+\s*)w)? # week 361 \s*((?P<w>\d+\s*)w)? # week
362 \s*((?P<d>\d+\s*)d)? # day 362 \s*((?P<d>\d+\s*)d)? # day
363 \s*(((?P<H>\d+):(?P<M>\d+))?(:(?P<S>\d+))?)? # time 363 \s*(((?P<H>\d+):(?P<M>\d+))?(:(?P<S>\d+))?)? # time
364 \s*''', re.VERBOSE), serialised_re=re.compile(''' 364 \s*''', re.VERBOSE), serialised_re=re.compile('''
365 (?P<s>[+-])(?P<y>\d{4})(?P<m>\d{2})(?P<d>\d{2}) 365 (?P<s>[+-])?1?(?P<y>([ ]{3}\d|\d{4}))(?P<m>\d{2})(?P<d>\d{2})
366 (?P<H>\d{2})(?P<M>\d{2})(?P<S>\d{2})''', re.VERBOSE)): 366 (?P<H>\d{2})(?P<M>\d{2})(?P<S>\d{2})''', re.VERBOSE)):
367 ''' set the date to the value in spec 367 ''' set the date to the value in spec
368 ''' 368 '''
369 self.year = self.month = self.week = self.day = self.hour = \ 369 self.year = self.month = self.week = self.day = self.hour = \
370 self.minute = self.second = 0 370 self.minute = self.second = 0

Roundup Issue Tracker: http://roundup-tracker.org/