Time.st
changeset 4649 3eaf75dd8973
parent 4412 9d7d27246c25
child 4845 ffd67920b3a3
--- a/Time.st	Wed Sep 01 17:10:07 1999 +0200
+++ b/Time.st	Wed Sep 01 20:18:31 1999 +0200
@@ -474,37 +474,6 @@
     "Modified: 22.2.1996 / 16:58:30 / cg"
 !
 
-printOn:aStream format:aFormatString
-    "print using a format string;
-     valid format items are:
-        %h      hours, 00..23 (i.e. european)  0-padded to length 2
-        %u      hours, 00..12 (i.e. us)        0-padded to length 2
-        %m      minutes, 00..59                0-padded to length 2
-        %s      seconds, 00..59                0-padded to length 2
-        %a      am/pm
-
-     special:
-        %H      24-hours - unpadded
-        %U      12-hours - unpadded
-        %M      minutes - unpadded
-        %S      seconds - unpadded
-        %A      AM/PM   - uppercase
-    "
-
-    aStream nextPutAll:(self printStringFormat:aFormatString)
-
-    "
-     Time now printOn:Transcript format:'%h:%m:%s'   . Transcript cr.      
-     Time now printOn:Transcript format:'%H:%m:%s'   . Transcript cr.      
-     Time now printOn:Transcript format:'%u:%m:%s %a'. Transcript cr.   
-     Time now printOn:Transcript format:'%h:%m'      . Transcript cr. 
-     Time now printOn:Transcript format:'%H:%m %A'   . Transcript cr.
-     Time now printOn:Transcript format:'minutes:%M seconds:%S'   . Transcript cr.
-    "
-
-    "Modified: 22.2.1996 / 16:58:30 / cg"
-!
-
 printString12HourFormat
     "return a printed representation in 12 hour format"
 
@@ -526,74 +495,6 @@
 
 !
 
-printStringFormat:aFormatString
-    "print using a format string;
-     valid format items are:
-        %h      hours, 00..23 (i.e. european)  0-padded to length 2
-        %u      hours, 00..12 (i.e. us)        0-padded to length 2
-        %m      minutes, 00..59                0-padded to length 2
-        %s      seconds, 00..59                0-padded to length 2
-        %a      am/pm
-
-     special:
-        %H      24-hours - unpadded
-        %U      12-hours - unpadded
-        %M      minutes - unpadded
-        %S      seconds - unpadded
-        %A      AM/PM   - uppercase
-
-        %t      seconds within hour  (unpadded)
-        %T      seconds from midNight  (unpadded)
-    "
-
-    |dict hours minutes seconds usHours ampm s|
-
-    hours := self hours.
-    minutes := self minutes.
-    seconds := self seconds.
-
-    hours // 12 == 0 ifTrue:[
-        ampm := 'am'.
-    ] ifFalse:[
-        ampm := 'pm'.
-    ].
-    usHours := hours.
-    usHours ~~ 0 ifTrue:[
-        usHours := usHours - 1 \\ 12 + 1.
-    ].
-
-    dict := IdentityDictionary new.
-    dict at:$H put:(s := hours printString).
-    dict at:$h put:(s leftPaddedTo:2 with:$0).
-    dict at:$U put:(s := usHours printString).
-    dict at:$u put:(s leftPaddedTo:2 with:$0).
-    dict at:$M put:(s := minutes printString).
-    dict at:$m put:(s leftPaddedTo:2 with:$0).
-    dict at:$S put:(s := seconds printString).
-    dict at:$s put:(s leftPaddedTo:2 with:$0).
-    dict at:$t put:(seconds * minutes) printString.
-    dict at:$T put:(seconds * minutes * hours) printString.
-    dict at:$a put:ampm.
-    dict at:$A put:ampm asUppercase.
-
-    ^ (aFormatString expandPlaceholdersWith:dict)
-
-    "
-     Time now printStringFormat:'%U:%m:%s %a'   
-
-     Time now printStringFormat:'%h:%m:%s'     
-     Time now printStringFormat:'%H:%m:%s'      
-     Time now printStringFormat:'%u:%m:%s %a'   
-     Time now printStringFormat:'%h:%m'         
-     Time now printStringFormat:'%H:%m %A'     
-     Time now printStringFormat:'%m minutes after %U %a'     
-     Time now printStringFormat:'%t seconds after %U %a'     
-     Time now printStringFormat:'%T seconds from midNight'     
-    "
-
-    "Modified: 22.2.1996 / 16:58:30 / cg"
-!
-
 shortPrintString
     "dummy - for now"
 
@@ -668,5 +569,5 @@
 !Time class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.41 1999-07-19 19:09:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.42 1999-09-01 18:18:31 stefan Exp $'
 ! !