Skip to content

Commit cb0ebb5

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent fc53869 commit cb0ebb5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Fixed:
1717
- extend OTK and session table value cols to TEXT (sf bug 1031271)
1818
- fix lookup of REMOTE_USER (sf bug 1002923)
1919
- new Interval props weren't created properly in rdbms
20+
- date.Interval() now accepts an Interval as a spec (sf bug 1041266)
2021

2122

2223
2004-07-21 0.7.6

roundup/date.py

Lines changed: 4 additions & 1 deletion
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.68.2.3 2004-09-29 07:31:32 richard Exp $
18+
# $Id: date.py,v 1.68.2.4 2004-10-08 00:34:58 richard Exp $
1919

2020
"""Date, time and time interval handling.
2121
"""
@@ -451,6 +451,9 @@ def __init__(self, spec, sign=1, allowdate=1, add_granularity=0):
451451
self.from_seconds(spec)
452452
elif type(spec) in (StringType, UnicodeType):
453453
self.set(spec, allowdate=allowdate, add_granularity=add_granularity)
454+
elif isinstance(spec, Interval):
455+
(self.sign, self.year, self.month, self.day, self.hour,
456+
self.minute, self.second) = spec.get_tuple()
454457
else:
455458
if len(spec) == 7:
456459
self.sign, self.year, self.month, self.day, self.hour, \

0 commit comments

Comments
 (0)