|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
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 $ |
19 | 19 |
|
20 | 20 | __doc__ = """ |
21 | 21 | Date, time and time interval handling. |
@@ -168,8 +168,10 @@ def __str__(self): |
168 | 168 | def pretty(self): |
169 | 169 | ''' print up the date date using a pretty format... |
170 | 170 | ''' |
171 | | - return time.strftime('%e %B %Y', (self.year, self.month, |
| 171 | + str = time.strftime('%d %B %Y', (self.year, self.month, |
172 | 172 | self.day, self.hour, self.minute, self.second, 0, 0, 0)) |
| 173 | + if str[0] == '0': return ' ' + str[1:] |
| 174 | + return str |
173 | 175 |
|
174 | 176 | def set(self, spec, offset=0, date_re=re.compile(r''' |
175 | 177 | (((?P<y>\d\d\d\d)-)?((?P<m>\d\d?)-(?P<d>\d\d?))?)? # yyyy-mm-dd |
@@ -383,6 +385,10 @@ def test(): |
383 | 385 |
|
384 | 386 | # |
385 | 387 | # $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 | +# |
386 | 392 | # Revision 1.16 2002/01/08 11:56:24 richard |
387 | 393 | # missed an import _ |
388 | 394 | # |
|
0 commit comments