Timestamp.st
branchjv
changeset 18040 a11a12546f23
parent 18017 7fef9e17913f
parent 14969 13470ec6f8c8
child 18120 e3a375d5f6a8
--- a/Timestamp.st	Mon Mar 25 23:04:02 2013 +0000
+++ b/Timestamp.st	Wed Mar 27 12:24:15 2013 +0000
@@ -295,27 +295,16 @@
     ^ self now
 !
 
-fromString: aString
-    "Answer a new instance for the value given by aString"
-
-    ^ self readFrom: (ReadStream on: aString).
-
-    "
-     Timestamp fromString: '1-10-2000 11:55:00 am'. 
-    "
-
-    "Modified (format): / 20-08-2011 / 16:51:53 / cg"
-!
-
 readFrom:aStringOrStream
     "Answer a new instance for the value given by aStringOrStream"
 
     ^ self 
         readFrom:aStringOrStream 
-        onError:[ ConversionError raiseRequestErrorString:'conversion error']
+        onError:[ ConversionError raiseRequestWith:aStringOrStream errorString:' - timestamp']
 
     "
      self readFrom:'23-jun-2000 15:00'
+     self fromString:'23-jun-2000 15:00'
      self readFrom:'23-jun-2000 '
     "
 
@@ -362,6 +351,7 @@
     "Modified: / 13.7.1999 / 12:30:26 / stefan"
 ! !
 
+
 !Timestamp class methodsFor:'private'!
 
 basicReadFrom:aStream
@@ -1467,6 +1457,7 @@
     "
 ! !
 
+
 !Timestamp methodsFor:'accessing'!
 
 day
@@ -2382,6 +2373,8 @@
     "
 ! !
 
+
+
 !Timestamp methodsFor:'testing'!
 
 isTimestamp
@@ -3170,11 +3163,11 @@
 !Timestamp class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.143 2013-01-25 13:34:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.144 2013-03-26 17:01:39 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.143 2013-01-25 13:34:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.144 2013-03-26 17:01:39 stefan Exp $'
 ! !