diff test/test_dates.py @ 861:68cef2bb929d

fixed the date module so that Date(". - 2d") works
author Richard Jones <richard@users.sourceforge.net>
date Sun, 14 Jul 2002 06:05:50 +0000
parents cfa460943d4d
children 9b910e8d987d
line wrap: on
line diff
--- a/test/test_dates.py	Sun Jul 14 04:03:15 2002 +0000
+++ b/test/test_dates.py	Sun Jul 14 06:05:50 2002 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: test_dates.py,v 1.11 2002-02-21 23:34:52 richard Exp $ 
+# $Id: test_dates.py,v 1.12 2002-07-14 06:05:50 richard Exp $ 
 
 import unittest, time
 
@@ -74,8 +74,12 @@
         # now check calculations
         date = Date('2000-01-01') + Interval('- 2y 2m')
         ae(str(date), '1997-11-01.00:00:00')
+        date = Date('2000-01-01 - 2y 2m')
+        ae(str(date), '1997-11-01.00:00:00')
         date = Date('2000-01-01') + Interval('2m')
         ae(str(date), '2000-03-01.00:00:00')
+        date = Date('2000-01-01 + 2m')
+        ae(str(date), '2000-03-01.00:00:00')
 
         date = Date('2000-01-01') + Interval('60d')
         ae(str(date), '2000-03-01.00:00:00')
@@ -150,6 +154,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.11  2002/02/21 23:34:52  richard
+# Oops, there's 24 hours in a day, and subtraction of intervals now works
+# properly.
+#
 # Revision 1.10  2002/02/21 23:11:45  richard
 #  . fixed some problems in date calculations (calendar.py doesn't handle over-
 #    and under-flow). Also, hour/minute/second intervals may now be more than

Roundup Issue Tracker: http://roundup-tracker.org/