Handle 12:10 am correct when reading times.
authorStefan Vogel <sv@exept.de>
Sat, 26 Apr 2003 00:52:13 +0200
changeset 7240 341d1ac49d42
parent 7239 e4f062245457
child 7241 06359d192b65
Handle 12:10 am correct when reading times.
Time.st
--- a/Time.st	Fri Apr 25 21:55:07 2003 +0200
+++ b/Time.st	Sat Apr 26 00:52:13 2003 +0200
@@ -151,10 +151,10 @@
                     (str peek == $m or:[str peek == $M]) ifTrue:[
                         str next
                     ].
-                    hour >= 12 ifTrue:[^ exceptionBlock value].
-                    hour == 24 ifTrue:[
+                    hour == 12 ifTrue:[
                         hour := 0.
-                    ]
+                    ].
+                    hour > 12 ifTrue:[^ exceptionBlock value].
                 ]
             ]
         ].
@@ -173,6 +173,8 @@
      Time readFrom:'14'    
      Time readFrom:'2 am'    
      Time readFrom:'2 pm'    
+     Time readFrom:'12:05 pm'    
+     Time readFrom:'12:06 am'    
 
      Time readFrom:'18:22:00'    
      Time readFrom:'14:00:11'    
@@ -649,5 +651,5 @@
 !Time class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.62 2003-03-19 11:22:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.63 2003-04-25 22:52:13 stefan Exp $'
 ! !