'From Squeak3.2 of 15 February 2002 [latest update: #4948] on 15 October 2002 at 11:35:28 am'! "Change Set: Date-next-tk Date: 15 October 2002 Author: Ted Kaehler Defines next and previous for Date, Month, Week. Useful for determining if the next Date in a collection is the next one in calendar order. (Or if there is a gap.) Also, give a printString that has the minimum information to specify this date relative to two others. If other two are in the same month, just return day of month. If in same year return day and month."! !Date methodsFor: 'inquiries' stamp: 'tk 6/24/2002 15:52'! next "Answer the next day. For compatibility with Week, Month" ^ self addDays: 1! ! !Date methodsFor: 'inquiries' stamp: 'tk 6/24/2002 15:49'! previous "Answer the previous day. For compatibility with Week, Month" ^ self subtractDays: 1! ! !Date methodsFor: 'printing' stamp: 'tk 10/15/2002 11:34'! uniqueDateStringBetween: start and: end "Return a printString for self, with just enough information to distinguish it from other dates in the range." "later, be more spohistocated" start year + 1 >= end year ifFalse: [^ self printFormat: #(1 2 3 $ 3 1)]. "full" start week next >= end week ifFalse: [^ self printFormat: #(2 1 9 $ 3 1)]. "May 6" ^ self weekday! ! !Month methodsFor: 'converting' stamp: 'tk 6/24/2002 15:51'! next ^ self class fromDate: (self addDays: 32) ! ! !Week methodsFor: 'converting' stamp: 'tk 6/24/2002 15:50'! next ^ self class fromDate: (self firstDate addDays: 7)! !