--- a/HistoryManager.st Mon Mar 05 16:21:17 2007 +0100
+++ b/HistoryManager.st Tue Mar 06 18:30:16 2007 +0100
@@ -766,16 +766,14 @@
!HistoryManager::HistoryLine class methodsFor:'converting'!
-convertAStringToADate: aString
- "kludge while not having the Time and Date format spec Class"
+convertStringToDate: aString
+ "kludge"
| s day month year coll |
"delete delimiter from the date string"
- s := aString copyReplaceAll: $. with:(Character space) .
- s replaceAll: $- with:(Character space).
- s replaceAll: $/ with:(Character space).
- coll := s asArrayOfSubstrings.
+ coll := aString asCollectionOfSubstringsSeparatedByAny:'.-/'.
+
day := (coll at: 1) asNumber.
month := Number readFrom:(coll at: 2 ) onError:nil.
month isNil ifTrue:[
@@ -797,17 +795,18 @@
"
HistoryLine convertAStringToADate:'18.10.1995'
- HistoryLine convertAStringToADate:'18.10.95'
- HistoryLine convertAStringToADate:'18.10.01'
+ HistoryLine convertAStringToADate:'18.10.95'
+ HistoryLine convertAStringToADate:'18.10.01'
"
"Modified: / 23-08-1995 / 21:28:58 / robert"
"Modified: / 16-09-1997 / 14:35:03 / stefan"
- "Modified: / 17-03-2004 / 12:51:49 / cg"
+ "Created: / 06-03-2007 / 17:04:34 / cg"
+ "Modified: / 06-03-2007 / 18:28:57 / cg"
!
-convertAStringToATime: aString
- "kludge while not having the Time and Date format spec Class"
+convertStringToTime: aString
+ "kludge"
|h m s|
@@ -826,7 +825,7 @@
"
"Modified: / 15-08-1995 / 18:56:18 / robert"
- "Modified: / 19-02-2007 / 23:35:49 / cg"
+ "Created: / 06-03-2007 / 17:05:03 / cg"
! !
!HistoryManager::HistoryLine class methodsFor:'documentation'!
@@ -878,7 +877,7 @@
!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.65 2007-02-20 09:40:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.66 2007-03-06 17:30:16 cg Exp $'
! !
!HistoryManager::HistoryLine class methodsFor:'filtering'!
@@ -1060,12 +1059,12 @@
idx := idx + 1.
].
- aDate := self convertAStringToADate: (anArray at: idx).
+ aDate := self convertStringToDate: (anArray at: idx).
inst date: aDate.
(anArray at:idx+1) ~= Separator ifTrue:[^ nil].
idx := idx + 2.
- aTime := self convertAStringToATime: (anArray at: idx).
+ aTime := self convertStringToTime: (anArray at: idx).
inst time: aTime.
(anArray at:idx+1) ~= Separator ifTrue:[^ nil].
idx := idx + 2.
@@ -1504,7 +1503,7 @@
!HistoryManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.65 2007-02-20 09:40:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.66 2007-03-06 17:30:16 cg Exp $'
! !
HistoryManager initialize!