comparison roundup/date.py @ 2403:1cc51a44ce39 maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Tue, 08 Jun 2004 05:39:37 +0000
parents a13ec40cf8f5
children 5080ca961b2e
comparison
equal deleted inserted replaced
2399:e94e261a1373 2403:1cc51a44ce39
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.68 2004-05-06 02:35:46 richard Exp $ 18 # $Id: date.py,v 1.68.2.1 2004-06-08 05:39:37 richard Exp $
19 19
20 """Date, time and time interval handling. 20 """Date, time and time interval handling.
21 """ 21 """
22 __docformat__ = 'restructuredtext' 22 __docformat__ = 'restructuredtext'
23 23
347 347
348 Note that if the day is zero, and the day appears first in the 348 Note that if the day is zero, and the day appears first in the
349 format, then the day number will be removed from output. 349 format, then the day number will be removed from output.
350 ''' 350 '''
351 str = time.strftime(format, (self.year, self.month, self.day, 351 str = time.strftime(format, (self.year, self.month, self.day,
352 self.hour, self.minute, self.second, 0, 0, 0)) 352 self.hour, self.minute, int(self.second), 0, 0, 0))
353 # handle zero day by removing it 353 # handle zero day by removing it
354 if format.startswith('%d') and str[0] == '0': 354 if format.startswith('%d') and str[0] == '0':
355 return ' ' + str[1:] 355 return ' ' + str[1:]
356 return str 356 return str
357 357

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