#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Fri, 01 Mar 2019 16:16:03 +0100
changeset 23790 42e8ecc961bc
parent 23789 afa1be88c07e
child 23791 1ed5a9d17a03
#REFACTORING by cg class: Time changed: #intervalString
Time.st
--- a/Time.st	Fri Mar 01 16:12:32 2019 +0100
+++ b/Time.st	Fri Mar 01 16:16:03 2019 +0100
@@ -578,45 +578,45 @@
     seconds := self seconds.
 
     hours = 0
-	ifTrue: [hh := '']
-	ifFalse: [
-	    hh := hours printString, ' hour'.
-	    hours > 1 ifTrue:[
-		hh := hh , 's'
-	    ]
-	].
+        ifTrue: [hh := '']
+        ifFalse: [
+            hh := hours printString, ' hour'.
+            hours > 1 ifTrue:[
+                hh := hh , 's'
+            ]
+        ].
     minutes = 0
-	ifTrue: [mm := '']
-	ifFalse: [
-	    mm := minutes printString, ' minute'.
-	    minutes > 1 ifTrue:[
-		mm := mm , 's'
-	    ]
-	].
+        ifTrue: [mm := '']
+        ifFalse: [
+            mm := minutes printString, ' minute'.
+            minutes > 1 ifTrue:[
+                mm := mm , 's'
+            ]
+        ].
     seconds = 0
-	ifTrue: [ss := '']
-	ifFalse: [
-	    ss := seconds printString, ' second'.
-	    seconds > 1 ifTrue:[
-		ss := ss , 's'
-	    ]
-	].
+        ifTrue: [ss := '']
+        ifFalse: [
+            ss := seconds printString, ' second'.
+            seconds > 1 ifTrue:[
+                ss := ss , 's'
+            ]
+        ].
 
     "/ do not show seconds, if hours are there
-    hh size > 0 ifTrue: [ss := ''].
+    hh size ~~ 0 ifTrue: [ss := ''].
 
     s := hh.
     mm notEmpty ifTrue:[
-	s notEmpty ifTrue:[
-	    s := s , ' '
-	].
-	s := s , mm.
+        s notEmpty ifTrue:[
+            s := s , ' '
+        ].
+        s := s , mm.
     ].
     ss notEmpty ifTrue:[
-	s notEmpty ifTrue:[
-	    s := s , ' '
-	].
-	s := s , ss
+        s notEmpty ifTrue:[
+            s := s , ' '
+        ].
+        s := s , ss
     ].
     ^ s
 
@@ -627,6 +627,8 @@
      (Time fromSeconds:5) intervalString
      (Time fromSeconds:65) intervalString
     "
+
+    "Modified: / 01-03-2019 / 16:14:41 / Claus Gittinger"
 !
 
 print24:prnt24FormatBoolean on:aStream