Skip to content

Commit 2eb35b9

Browse files
author
Richard Jones
committed
reverting to dates for intervals > 2 months sucks
1 parent f0c1c7c commit 2eb35b9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Feature:
2727
ADD_RECIPIENTS_TO_NOSY (default 'new'). These settings emulate the current
2828
behaviour. Setting them to 'yes' will add the author/recipients to the nosy
2929
on messages that create issues and followup messages.
30+
. reverting to dates for intervals > 2 months sucks
3031

3132
Fixed:
3233
. stop sending blank (whitespace-only) notes

roundup/date.py

Lines changed: 10 additions & 3 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.20 2002-02-21 23:34:51 richard Exp $
18+
# $Id: date.py,v 1.21 2002-05-15 06:32:46 richard Exp $
1919

2020
__doc__ = """
2121
Date, time and time interval handling.
@@ -366,8 +366,11 @@ def __repr__(self):
366366
def pretty(self):
367367
''' print up the date date using one of these nice formats..
368368
'''
369-
if self.year or self.month > 2:
370-
return None
369+
if self.year:
370+
if self.year == 1:
371+
return _('1 year')
372+
else:
373+
return _('%(number)s years')%{'number': self.year}
371374
elif self.month or self.day > 13:
372375
days = (self.month * 30) + self.day
373376
if days > 28:
@@ -437,6 +440,10 @@ def test():
437440

438441
#
439442
# $Log: not supported by cvs2svn $
443+
# Revision 1.20 2002/02/21 23:34:51 richard
444+
# Oops, there's 24 hours in a day, and subtraction of intervals now works
445+
# properly.
446+
#
440447
# Revision 1.19 2002/02/21 23:11:45 richard
441448
# . fixed some problems in date calculations (calendar.py doesn't handle over-
442449
# and under-flow). Also, hour/minute/second intervals may now be more than

0 commit comments

Comments
 (0)