Skip to content

Commit 3333c0f

Browse files
author
Jürgen Hermann
committed
%e is a UNIXism and not documented for Python
1 parent ba0434b commit 3333c0f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

roundup/date.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: date.py,v 1.17 2002-01-16 07:02:57 richard Exp $
18+
# $Id: date.py,v 1.18 2002-01-23 20:00:50 jhermann Exp $
1919

2020
__doc__ = """
2121
Date, time and time interval handling.
@@ -168,8 +168,10 @@ def __str__(self):
168168
def pretty(self):
169169
''' print up the date date using a pretty format...
170170
'''
171-
return time.strftime('%e %B %Y', (self.year, self.month,
171+
str = time.strftime('%d %B %Y', (self.year, self.month,
172172
self.day, self.hour, self.minute, self.second, 0, 0, 0))
173+
if str[0] == '0': return ' ' + str[1:]
174+
return str
173175

174176
def set(self, spec, offset=0, date_re=re.compile(r'''
175177
(((?P<y>\d\d\d\d)-)?((?P<m>\d\d?)-(?P<d>\d\d?))?)? # yyyy-mm-dd
@@ -383,6 +385,10 @@ def test():
383385

384386
#
385387
# $Log: not supported by cvs2svn $
388+
# Revision 1.17 2002/01/16 07:02:57 richard
389+
# . lots of date/interval related changes:
390+
# - more relaxed date format for input
391+
#
386392
# Revision 1.16 2002/01/08 11:56:24 richard
387393
# missed an import _
388394
#

0 commit comments

Comments
 (0)