#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Thu, 12 May 2016 02:28:21 +0200
changeset 19789 c7d12ebf2ebd
parent 19788 5b67ddd14655
child 19790 d99c007f4c5b
#DOCUMENTATION by cg class: Date comment/format in: #< #= #>
Date.st
--- a/Date.st	Wed May 11 17:56:31 2016 +0200
+++ b/Date.st	Thu May 12 02:28:21 2016 +0200
@@ -926,7 +926,6 @@
     "
 ! !
 
-
 !Date class methodsFor:'change & update'!
 
 update:something with:aParameter from:changedObject
@@ -1898,7 +1897,6 @@
     "Modified: 8.10.1996 / 19:25:39 / cg"
 ! !
 
-
 !Date class methodsFor:'private'!
 
 dayAbbrevsForLanguage:languageOrNilForDefault
@@ -2115,7 +2113,6 @@
     "
 ! !
 
-
 !Date methodsFor:'Compatibility-ANSI'!
 
 dayOfWeek
@@ -3167,13 +3164,14 @@
     "return true, if the date represented by the receiver
      is before the argument, aDate"
 
+    "/ quick check, if it is another Date; then we can tune this operation,
+    "/ by not having to compute the osTime
     (aDate isMemberOf:Date) ifTrue:[
         ^ dateEncoding < aDate dateEncoding
     ].
 
-    "the argument must understand year, month and day to be
-     comparable, whatever it is"
-
+    "/ the argument must understand year, month and day to be
+    "/ comparable, whatever it is
     ^ dateEncoding < (Date encodeYear:aDate year month:aDate month day:aDate day)
 
     "
@@ -3188,8 +3186,8 @@
     "return true, if the date represented by the receiver
      is the same as the one represented by argument, aDate"
 
+    "/ must have same class and same osTime
     (aDate isMemberOf:Date) ifFalse:[^ false].
-
     ^ dateEncoding = aDate dateEncoding
 
     "the argument must understand year, month and day to be
@@ -3197,8 +3195,8 @@
 
 "
     ^ dateEncoding = (Date encodeYear:aDate year
-				month:aDate month
-				  day:aDate day)
+                                month:aDate month
+                                  day:aDate day)
 "
     "Date today = ((Date today plusDays:7) minusDays:7)"
 !
@@ -3207,13 +3205,14 @@
     "return true, if the date represented by the receiver
      is after the argument, aDate"
 
+    "/ quick check, if it is another Date; then we can tune this operation,
+    "/ by not having to compute the osTime
     (aDate isMemberOf:Date) ifTrue:[
         ^ dateEncoding > aDate dateEncoding
     ].
 
-    "the argument must understand year, month and day to be
-     comparable, whatever it is"
-
+    "/ the argument must understand year, month and day,
+    "/ to be comparable, whatever it is
     ^ dateEncoding > (Date encodeYear:aDate year month:aDate month day:aDate day)
 
     "
@@ -3273,7 +3272,6 @@
 ! !
 
 
-
 !Date methodsFor:'obsolete'!
 
 asAbsoluteTime
@@ -3344,7 +3342,6 @@
     ^ self addDays:days
 ! !
 
-
 !Date methodsFor:'printing & storing'!
 
 addPrintBindingsTo:aDictionary