'From Squeak3.7beta of ''1 April 2004'' [latest update: #5923] on 2 June 2004 at 12:23:46 pm'! "Change Set: ChronologyUndeclaredFix2-nk Date: 2 June 2004 Author: Ned Konz Removes the following Undeclared refs from the Chronology and related tests categories: julianDayNumber in RuleDate>basicUpdateForMonth:year: WeekDayNames in RuleDate class>newDayOfWeek:selectionRule: timeZoneToRestore in TimeTest and TimespanTest I don't know if RuleDate works properly; could someone who understands this code look at this fix and write a test that exercises it? "! ClassTestCase subclass: #TimeTest instanceVariableNames: 'time aTime localTimeZoneToRestore ' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Chronology-Tests'! ClassTestCase subclass: #TimespanTest instanceVariableNames: 'timespan aTimespan anOverlappingTimespan anIncludedTimespan aDisjointTimespan aDay aWeek dec31 jan01 jan08 localTimeZoneToRestore ' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Chronology-Tests'! !RuleDate methodsFor: 'private' stamp: 'nk 6/2/2004 12:15'! basicUpdateForMonth: mm year: yyyy "Private - Answer the receiver after updating by applying the rule for the month, mm, of year, yyyy." | dayByRule daysNamedInMonth firstDayNamed | firstDayNamed := self dayInMonth: mm year: yyyy ofFirstDayNamed: dayOfWeek. daysNamedInMonth := (firstDayNamed to: self daysInMonth by: 7) asArray. dayByRule := self applyRuleTo: daysNamedInMonth. self start: (Date newDay: dayByRule month: mm year: yyyy). ! ! !RuleDate class methodsFor: 'private' stamp: 'nk 6/2/2004 12:09'! newDayOfWeek: dayName selectionRule: positionName "Private - Answer an uncreated rule date with the dayOfWeek (Sunday, etc) set to dayName, and selectionRule (first, last) set to positionName. Note: Must be updated to create the date. Parameters dayName captured positionName captured Return Values new " | daySymbol newRuleDate positionSymbol | (dayName isMemberOf: String) ifFalse: [^ Error signal: 'Day name: "' , dayName , '" is not a String.']. daySymbol := dayName asLowercase. daySymbol at: 1 put: (daySymbol at: 1) asUppercase. daySymbol := daySymbol asSymbol. (Week dayNames includes: daySymbol) ifFalse: [^ Error signal: 'Day name: "' , dayName , '" is not valid.']. positionSymbol := self getValidSelectionRule: positionName. newRuleDate := super new. newRuleDate setDayOfWeek: daySymbol selectionRule: positionSymbol. ^ newRuleDate! ! ClassTestCase subclass: #TimespanTest instanceVariableNames: 'timespan aTimespan anOverlappingTimespan anIncludedTimespan aDisjointTimespan aDay aWeek dec31 jan01 jan08 localTimeZoneToRestore' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Chronology-Tests'! ClassTestCase subclass: #TimeTest instanceVariableNames: 'time aTime localTimeZoneToRestore' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Chronology-Tests'!