Mercurial > p > roundup > code
diff roundup/date.py @ 248:96cdd8ef0581
Added some more help to roundup-admin
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 18 Sep 2001 22:58:37 +0000 |
| parents | 0dfe39b4fa17 |
| children | bdc2ea127ae9 |
line wrap: on
line diff
--- a/roundup/date.py Wed Sep 12 08:31:42 2001 +0000 +++ b/roundup/date.py Tue Sep 18 22:58:37 2001 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: date.py,v 1.12 2001-08-17 03:08:11 richard Exp $ +# $Id: date.py,v 1.13 2001-09-18 22:58:37 richard Exp $ import time, re, calendar @@ -317,10 +317,13 @@ ''' if self.year or self.month > 2: return None - if self.month: + if self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: - return '%s months'%int(days/30) + if int(days/30) > 1: + return '%s months'%int(days/30) + else: + return '1 month' else: return '%s weeks'%int(days/7) if self.day > 7: @@ -376,6 +379,9 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.12 2001/08/17 03:08:11 richard +# fixed prettification of intervals of 1 week +# # Revision 1.11 2001/08/15 23:43:18 richard # Fixed some isFooTypes that I missed. # Refactored some code in the CGI code.
