Date.st
changeset 7005 e8392cfd4341
parent 6976 4529a6fafa92
child 7023 6092f474bbba
--- a/Date.st	Tue Feb 04 18:36:26 2003 +0100
+++ b/Date.st	Tue Feb 04 18:50:39 2003 +0100
@@ -402,6 +402,22 @@
     "Modified: 19.4.1996 / 15:28:15 / cg"
 ! !
 
+!Date class methodsFor:'Compatibility - Squeak'!
+
+fromSeconds:seconds
+    "Answer an instance of me which is 'seconds' seconds after January 1, 1901."
+
+    | secondsInDay |
+
+    secondsInDay := 24 * 60 * 60.
+    ^self fromDays: seconds // secondsInDay
+
+    "
+     Date fromSeconds:0
+     Date fromSeconds:(24 * 60 * 60 * 365)
+    "
+! !
+
 !Date class methodsFor:'general queries'!
 
 abbreviatedNameOfDay:dayIndex
@@ -1947,7 +1963,7 @@
 !Date class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Date.st,v 1.67 2003-01-28 19:49:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Date.st,v 1.68 2003-02-04 17:50:39 penk Exp $'
 ! !
 
 Date initialize!