#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Wed, 09 May 2018 12:20:01 +0200
changeset 22827 9ea9757226e5
parent 22826 ec2526db594c
child 22828 1a4cf44b1ada
#REFACTORING by cg class: Timestamp removed: #printStringIso8601Format comment/format in: #printIso8601FormatOn:timeSeparator:
Timestamp.st
--- a/Timestamp.st	Wed May 09 12:19:54 2018 +0200
+++ b/Timestamp.st	Wed May 09 12:20:01 2018 +0200
@@ -373,6 +373,7 @@
     "Modified: / 13.7.1999 / 12:37:57 / stefan"
 ! !
 
+
 !Timestamp class methodsFor:'Compatibility-Squeak'!
 
 current
@@ -2751,9 +2752,9 @@
 printIso8601FormatOn:aStream timeSeparator:sepChar
     "append the iso8601 representation of the receiver to aStream.
      This format looks like:
-	1999-01-01T24:00:00
+        1999-01-01T24:00:00
      or, for zero hr:min:sec,
-	1999-01-01
+        1999-01-01
      Of course, a 24 hour clock is used.
 
      Timezone information (eg. Z or +0100) is added, so the reader will read as local time."
@@ -2761,20 +2762,20 @@
     |asUTC asLocal|
 
     self isUtcTimestamp ifTrue:[
-	asUTC := true. asLocal := false.
+        asUTC := true. asLocal := false.
     ] ifFalse:[
-	self isLocalTimestamp ifTrue:[
-	    asUTC := false. asLocal := false.
-	] ifFalse:[
-	    asUTC := false. asLocal := false.
-	]
+        self isLocalTimestamp ifTrue:[
+            asUTC := false. asLocal := false.
+        ] ifFalse:[
+            asUTC := false. asLocal := false.
+        ]
     ].
 
     Timestamp::TimestampISO8601Builder
-	print:self compact:false
-	asLocal:asLocal asUTC:asUTC withMilliseconds:true
-	timeSeparator:sepChar
-	on:aStream
+        print:self compact:false
+        asLocal:asLocal asUTC:asUTC withMilliseconds:true
+        timeSeparator:sepChar
+        on:aStream
 
 "/
 "/    |format|
@@ -2792,6 +2793,8 @@
 "/    self printOn:aStream format:format
 
     "
+     Timestamp now printStringIso8601Format.
+
      Timestamp now printIso8601FormatOn:Transcript. Transcript cr.
      Timestamp readIso8601FormatFrom:(Timestamp now printStringIso8601Format).
 
@@ -2944,21 +2947,6 @@
     "Created: / 16-06-2005 / 16:11:31 / masca"
 !
 
-printStringIso8601Format
-    "return the Iso8601 representation of the receiver with local timezon information.
-     This format looks like:
-	1999-01-01T24:00:00
-     or, for zero hr:min:sec,
-	1999-01-01
-     Of course, a 24 hour clock is used."
-
-    ^ String streamContents:[:s | self printIso8601FormatOn:s]
-
-    "
-     Timestamp now printStringIso8601Format
-    "
-!
-
 printStringRFC1123Format
     "return the RFC1123 representation of the receiver.
      This format is used in HTTP requests and looks like: