comparison did only care for seconds, when used with timeDurations
authorsr
Thu, 18 Oct 2007 10:33:46 +0200
changeset 10744 afd1835c12d2
parent 10743 3a082f8aa7fc
child 10745 4ac84a1c1516
comparison did only care for seconds, when used with timeDurations
Time.st
--- a/Time.st	Wed Oct 17 14:02:41 2007 +0200
+++ b/Time.st	Thu Oct 18 10:33:46 2007 +0200
@@ -433,6 +433,9 @@
 < aTime
     "return true if the receiver is before the argument"
 
+    aTime class == self class ifTrue:[
+        ^ timeEncoding < aTime timeEncoding
+    ].
     ^ self getSeconds < aTime getSeconds
 !
 
@@ -451,13 +454,16 @@
 > aTime
     "return true if the receiver is before the argument"
 
+    aTime class == self class ifTrue:[
+        ^ timeEncoding > aTime timeEncoding
+    ].
     ^ self getSeconds > aTime getSeconds
 !
 
 hash
     "return an integer useful for hashing on times"
 
-    ^ self getSeconds
+    ^ timeEncoding
 ! !
 
 !Time methodsFor:'converting'!
@@ -709,5 +715,5 @@
 !Time class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.80 2007-07-18 12:16:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.81 2007-10-18 08:33:46 sr Exp $'
 ! !