Senders use Userpreference setting to choose conversion
authorClaus Gittinger <cg@exept.de>
Wed, 15 Jan 2003 12:04:35 +0100
changeset 1192 5aea356953d7
parent 1191 a63c8b5e4c6d
child 1193 284ddbdecb63
Senders use Userpreference setting to choose conversion
HistoryManager.st
--- a/HistoryManager.st	Tue Dec 10 10:33:05 2002 +0100
+++ b/HistoryManager.st	Wed Jan 15 12:04:35 2003 +0100
@@ -760,7 +760,7 @@
 !HistoryManager::HistoryLine class methodsFor:'converting'!
 
 convertAStringToADate: aString
-   "kludge while not having the Time and Date format spec Class"
+    "kludge while not having the Time and Date format spec Class"
 
     | s day month year coll |
 
@@ -771,11 +771,15 @@
     month := (coll at: 2 ) asNumber.
     year := (coll at: 3 ) asNumber.
 
+    (year between:0 and:99) ifTrue:[
+        year := UserPreferences current twoDigitDateHandler value:year.
+    ].
     ^ Date newDay:day month:month year:year.
 
     "
      HistoryLine convertAStringToADate:'18.10.1995'
      HistoryLine convertAStringToADate:'18.10.95'
+     HistoryLine convertAStringToADate:'18.10.01'
     "
 
     "Modified: / 23.8.1995 / 21:28:58 / robert"
@@ -851,7 +855,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.48 2002-07-11 20:12:49 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.49 2003-01-15 11:04:35 cg Exp $'
 ! !
 
 !HistoryManager::HistoryLine class methodsFor:'filtering'!
@@ -1485,6 +1489,8 @@
 !HistoryManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.48 2002-07-11 20:12:49 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.49 2003-01-15 11:04:35 cg Exp $'
 ! !
+
 HistoryManager initialize!
+HistoryManager::HistoryLine initialize!