Time.st
branchjv
changeset 21024 8734987eb5c7
parent 20727 fb8c5591428b
parent 20818 efa2de8569f6
child 25423 bcfde4da086a
--- a/Time.st	Wed Oct 26 23:35:39 2016 +0100
+++ b/Time.st	Fri Nov 18 20:48:04 2016 +0000
@@ -329,70 +329,70 @@
      either 24 hour format or being am."
 
     ^ [
-	|str hour min sec peekC millis|
+        |str hour min sec peekC millis|
 
-	str := aStringOrStream readStream.
+        str := aStringOrStream readStream.
 
-	hour := Integer readFrom:str.
-	(hour between:0 and:24) ifFalse:[^ exceptionBlock value].
+        hour := Integer readFrom:str.
+        (hour between:0 and:24) ifFalse:[^ exceptionBlock value].
 
-	min := 0.
-	sec := 0.
-	millis := 0.
+        min := 0.
+        sec := 0.
+        millis := 0.
 
-	str atEnd ifFalse:[
-	    peekC := str peek.
-	    (peekC == $:) ifTrue:[
-		str next.
-		min := Integer readFrom:str.
-		(min between:0 and:59) ifFalse:[^ exceptionBlock value].
+        str atEnd ifFalse:[
+            peekC := str peek.
+            (peekC == $:) ifTrue:[
+                str next.
+                min := Integer readFrom:str.
+                (min between:0 and:59) ifFalse:[^ exceptionBlock value].
 
-		(str peek == $:) ifTrue:[
-		    str next.
-		    sec := Integer readFrom:str.
-		    (sec between:0 and:59) ifFalse:[^ exceptionBlock value].
-		    (str peek == $.) ifTrue:[
-			str next.
-			millis := ((Fraction readDecimalFractionFrom:str onError:[^ exceptionBlock value]) * 1000) asInteger.
-		    ].
-		].
-		peekC := str peek.
-	    ].
-	    [peekC == Character space] whileTrue:[str next. peekC := str peek].
-	    (peekC == $p or:[peekC == $P]) ifTrue:[
-		str next.
-		(str peek == $m or:[str peek == $M]) ifTrue:[
-		    str next
-		].
-		(hour <= 0 or:[hour > 12]) ifTrue:[^ exceptionBlock value].
+                (str peek == $:) ifTrue:[
+                    str next.
+                    sec := Integer readFrom:str.
+                    (sec between:0 and:59) ifFalse:[^ exceptionBlock value].
+                    (str peek == $.) ifTrue:[
+                        str next.
+                        millis := ((Fraction readDecimalFractionFrom:str onError:[^ exceptionBlock value]) * 1000) asInteger.
+                    ].
+                ].
+                peekC := str peek.
+            ].
+            [peekC == Character space] whileTrue:[str next. peekC := str peek].
+            (peekC == $p or:[peekC == $P]) ifTrue:[
+                str next.
+                (str peek == $m or:[str peek == $M]) ifTrue:[
+                    str next
+                ].
+                (hour <= 0 or:[hour > 12]) ifTrue:[^ exceptionBlock value].
 
-		"pm"
-		hour ~~ 12 ifTrue:[
-		    hour := hour + 12
-		].
-		peekC := str peek
-	    ] ifFalse:[
-		(peekC == $a or:[peekC == $A]) ifTrue:[
-		    str next.
-		    (str peek == $m or:[str peek == $M]) ifTrue:[
-			str next
-		    ].
-		    hour == 12 ifTrue:[
-			hour := 0.
-		    ].
-		    hour > 12 ifTrue:[^ exceptionBlock value].
-		    peekC := str peek
-		] ifFalse:[
-		    "/ cg: dont be too picky here - we do not care, what comes after the
-		    "/ time string. (Needed to be able to read rfc822 strings where a timezone
-		    "/ follows (-/+0700 GMT, for example)
+                "pm"
+                hour ~~ 12 ifTrue:[
+                    hour := hour + 12
+                ].
+                peekC := str peek
+            ] ifFalse:[
+                (peekC == $a or:[peekC == $A]) ifTrue:[
+                    str next.
+                    (str peek == $m or:[str peek == $M]) ifTrue:[
+                        str next
+                    ].
+                    hour == 12 ifTrue:[
+                        hour := 0.
+                    ].
+                    hour > 12 ifTrue:[^ exceptionBlock value].
+                    peekC := str peek
+                ] ifFalse:[
+                    "/ cg: don't be too picky here - we do not care, what comes after the
+                    "/ time string. (Needed to be able to read rfc822 strings where a timezone
+                    "/ follows (-/+0700 GMT, for example)
 "/                    peekC notNil ifTrue:[
 "/                        peekC isSeparator ifFalse:[^ exceptionBlock value].
 "/                    ]
-		].
-	    ]
-	].
-	self basicNew setHours:hour minutes:min seconds:sec milliseconds:millis
+                ].
+            ]
+        ].
+        self basicNew setHours:hour minutes:min seconds:sec milliseconds:millis
     ] on:Error do:exceptionBlock.
 
     "